is_user_logged_in() affects unrelated content
-
I’m using is_user_logged_in() in sidebar.php. Everything in sidebar.php works fine but, if a visitor is not logged in, get_content() in home.php does not happen
sidebar.php:
<?php if ( is_user_logged_in() ) : ?>
some html
<?php else: ?>
other html
<?php endif; ?>_____________
home.php:<?php get_header(); ?>
<?php get_sidebar(); ?>
<div id=”main-content”>
<?php the_content(); ?>
</div>
<?php get_footer(); ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘is_user_logged_in() affects unrelated content’ is closed to new replies.