Friday, November 5, 2010

if there is a user currently logged in

<?php if ( is_user_logged_in() ) { ?>
<!-- text that logged in users will see -->
<?php } else { ?>
<!-- here is a paragraph that is shown to anyone not logged in -->
<p>By <a href="<?php bloginfo('url'); ?>/wp-register.php">registering</a>,
you can save your favorite posts for future reference.</p>
<?php } ?>
if there is a user currently logged in

No comments:

Post a Comment