Display login or register links

Display login or register link

<?php if(is_user_logged_in()):?>

<?php else: // not logged in ?>
<?php wp_die('Sorry, you must first '. wp_loginout( get_permalink() ).' to view this page. You can '.wp_register( '', '').'.'); ?>
<?php endif; // logged in? ?>

Leave a Reply