• Hello –
    In WP 3.0.1, I would like to show different menu items in the menu bar if a user is logged in. The public users and logged in users should have different items available to them. How can I accomplish this?

    Thanks in advance,

    Steve.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Steve,

    that feature is coming with Menubar 4.8, when you will be able to generate a menu link with PHP code, e.g.

    $some_url = some expression;
    $other_url = other expression;
    
    if (some-condition)
    return $some_url;
    else if (other-condition)
    return $other_url;
    else
    return '';

    If you return an empty value, no menu item will be generated.
    Please stay tuned!

    PS: if you need to implement that feature with Menubar 4.7, you could create two different menus, and show only one of them putting this PHP code in your theme:

    if (condition)
    do_action('wp_menubar','firstmenu');
    else
    do_action('wp_menubar','secondmenu');

    Hi Steve,

    Menubar 4.8 is now available, you can give it a try!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Changing menu items according to user level’ is closed to new replies.