Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor etoilewebdesign

    (@etoilewebdesign)

    Hi Jane,

    If you’re comfortable with PHP, you could make use of our public function to achieve this. Please see the tutorial video we created about this here: https://www.youtube.com/watch?v=bKiJAjq7PhQ.

    You could place the code directly in your single.php template (or category.php or whichever template controls the page on which you want to restrict content.)

    It might look something like this:

    if( is_category('x') ){
        $FEUP = new FEUP_User;
        if( $FEUP->Is_Logged_In() ){
            the_content();
        }
        else{
            echo 'Sorry, but you must be logged in to view this content.';
        }
    }
    else{
        the_content();
    }

    If that doesn’t work “out of the box”, you may have to do some trial and error to get what you want.

    Thread Starter janerohde

    (@janerohde)

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘restrict access to category’ is closed to new replies.