• Hello. I am running WP 3.0.1, and have a question about menus.

    Is there a way (or plugin) that will allow me to hide navigation menu items from users who are not logged in?

    Thanks for your help.

    Rusty

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

    (@rpainter)

    anyone?

    derdaani

    (@derdaani)

    I’d be interested in that one as well. Or is it rather an extension of the question?

    I want to display several menu items depending on the logged in user.
    Eg. user1 gets an additional menu item user1, user2 gets an additional menu item user2, not logged in user gets none of the above.

    Possible?

    Evo

    (@shane_tactical1)

    This is a bit late but you could always use this

    <?php if ( is_user_logged_in() ) { ?>
     <li><a href="<?php echo get_permalink(postidhere); ?>">Member</a></li>
     <?php } else { ?>
       <li><a href="<?php echo get_permalink(postidehere); ?>">Register</a></li>
    <?php } ?>

    If they are a registered user they will get the Member page,
    If they arent they get the register tab on the menu.
    The postidhere is the post id number. You can get this by going into the pages/post area of the dashboard and hovering over the title. Look at the bottom of the browser (bottom left usually) and inside the url will be the post id.
    Example:
    https://yoursite.com/wp-admin/post.php?post=11&action=edit

    So the post id in this example is 11.

    I normally set my member pages up as private pages only and then use the role editor plugin to give subscribers access to private pages.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Show Menu Item to Logged In Users Only’ is closed to new replies.