WordPress.org

Ready to get started?Download WordPress

Forums

Hide <something> if person is not loged in? (4 posts)

  1. Arthursdomain
    Member
    Posted 7 years ago #

    Hi again!
    I have another question, I just installed wordpress for the first time today so of course im gonna be on here a lot :]
    The question is... is there a way to hide certain aspects of a page/template based on user type (ie.guest/editor/etc.) Im assuming there is a way since it does that in the back end of the admin, but is there a way to do it in the front end, so when a guest comes in, it will give them like a simple login and some news?

    Thanks

  2. charle97
    Member
    Posted 7 years ago #

    is_user_logged_in()

  3. Arthursdomain
    Member
    Posted 7 years ago #

    I will try that when i return to work tomorrow. Could someone post a simple example of this in action? I learn well that way. thanks!

  4. Arthursdomain
    Member
    Posted 7 years ago #

    This is what im writing... im fairly sure its close but still off.

    if ($is_user_logged_in()){
    				<?php $hemingwayEx->get_block_output('block_5'); ?>
    			}

Topic Closed

This topic has been closed to new replies.

About this Topic