• Hello guys,I have a issue to resolve here. In my wordpress News/blog site, I have a text in the sidebar which says
    “Please Login or Register to be able to add comments to this site and receive email updates.” I want that to disappear after someone login. Do I need to add PHP around that text to hide it based on the login or I can use some sort of plugin which can do that.
    Hopefully someone can come up with the solution here, Here is the url of the site if you like to see how it look.
    https://www.al-amana.net

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter junoonis

    (@junoonis)

    hello.. any suggestions?

    Just test on the existence of the global $user_identity var, which is available only when a site visitor is logged in:

    <?php
    global $user_identity;
    if( !$user_identity ) :
    ?>
    
    ~ Display me when someone is not logged in ~
    
    <?php endif; ?>
    Thread Starter junoonis

    (@junoonis)

    Thanks man, I will try this out today.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hide content after someone Login’ is closed to new replies.