WordPress.org

Ready to get started?Download WordPress

Forums

Hide menu items from customers? (1 post)

  1. csaknoriss
    Member
    Posted 2 years ago #

    (I do not speak English well)...

    I use the following code but it is not good.
    What is wrong?

    <?php
    if ( is_user_logged_in() ) {
        wp_nav_menu(array('theme_location' => 'main', 'menu_id' => 'menu'));
    } else {
        wp_nav_menu(array('theme_location' => 'main', 'menu_id' => 'visitor'));
    };
    ?>

    [Please post code or markup snippets between backticks or use the code button.]

    I want to watch a member of each menu item the customer is not all.

    solvable??

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.