0

function protected_replace_content ($content) {
    if (is_page( 429 ) && !is_user_logged_in() || is_category( '49' ) && !is_user_logged_in() || in_category('client-connection') && !is_user_logged_in()) {
        $content = 'You need to login to view this page content. Please <a href="client-portals">Login</a>';
    }
    return $content;
}
 add_filter ('the_content', 'protected_replace_content', 100);

Jagdish Sarma Asked question March 8, 2022
Add a Comment