Support » Themes and Templates » is_user_logged_in

  • Resolved Steven Jones

    (@rainemaida)


    I have some code – what it should do is, if the user is not logged in and it’s category 97 then you should get the member message. If they are logged in then they’ll get the content.

    <?php if !(is_user_logged_in()) && (in_category('97')) { ?>
    You'll need to be a member to view this content.
    <?php } else { ?>
    <?php the_content(); ?>
    <?php } ?>

    What am I doing wrong?

    Cheers,
    Steve

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘is_user_logged_in’ is closed to new replies.