Scroll to top

How to display different links for logged in and logged out users?

Share on facebook
Share on google
Share on twitter
Share on linkedin
<div class="fr">             
    <ul class="rss">                  
        <li><a href="">Support</a></li>                 
        <li><?php if (is_user_logged_in() ) { 
                echo " <a href=\"" . wp_logout_url() . "\" title=\"Logout\">Logout</a>";
                echo " <a href=\"" title=\"Login\">Member Login</a>";
            } ?>

In case of redirecting you can use  wp_logout_url(home_url()) to redirect it to Homepage.

envato iconUpwork Profile