Hiding content from users not logged in, a few problems with it (2 posts)

  1. Yyrkoon
    Posted 10 years ago #

    I've managed to find a way to display content on my website, using the following little code:

    <?php if ($user_ID) : ?>
    Random xhtml-code you want to display depending on user status (logged in or logged out).
    <?php endif; ?>

    But the problem is, that echoing the contents of $user_ID doesn't return anything when trying to use it in the following files:

    • header.php
    • comments.php
    • sidebar.php
    • footer.php

    But! It works in archives.php!

    Which kind of goes way beyond me. I want to exclude content for the logged out users on all instances and am looking for anything that can help me achieve that goal.

    So please help me out here guys & gals.

  2. goggi
    Posted 10 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic