WordPress.org

Ready to get started?Download WordPress

Forums

How to hide 3.0 custom menus from non logged in users? (3 posts)

  1. dubya1337
    Member
    Posted 4 years ago #

    I am trying to hidea custom menu (awsome 3.0 feature!) from non logged in users.
    I have figured out that it can most likely be done with<?php if (is_user_logged_in() ) { ?> but can't figure out where it would go. Any help would be appreciated.

  2. caugb
    Member
    Posted 4 years ago #

    <?php if (is_user_logged_in()) { wp_nav_menu([YOUR-CONFG]); } ?>

  3. dubya1337
    Member
    Posted 4 years ago #

    Thanks for that.
    Do I replace "YOUR-CONFIG" with the name of the menu?
    Or even better, is there a way of adding this directly to the nav menu itself? Perhaps in the back end or into the source so all are affected.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags