WordPress.org

Support

Support » Multisite » Multi Site Menu Problem

Multi Site Menu Problem

  • Hello,

    i am using wpms, and i am using thememylogin to manage my users.

    I have this code written which i use in the header of the theme.

    <?php if(current_user_can('level_10')) {
    echo "";}
    else {
    echo "<style type='text/css'>
    .menu-item-115 {display:none;}
    </style>";
    };
    ?>
    
    <!--    HIDES MENU ITEM IF THE USER IS NOT LOGGED IN   -->
    <?php if (is_user_logged_in()){
    echo "<style type='text/css'>
    .menu-item-112 {display:none;}
    .menu-item-109 {display:none;}
    .menu-item-108 {display:none;}
    </style>";}
    else {
    echo "<style type='text/css'>
    .menu-item-111 {display:none;}
    .menu-item-110 {display:none;}
    </style>";
    };
    ?>

    Now the problem is, that on a subsite, domain1.domain.com the menu order would be different, maybe menu item 111 is for a newsletter. ad so this menu item gets hidden?

    How can i assign the number or fix this?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • To hid a certain page menu, you would need to grab the page’s slug and do something like the following:

    if (is_user_logged_in() && is_page('newsletter'))

    Sorry parker, this doesn’t make sense/help me :/

    could you explain a bit further?

    Andrea Rennick

    @andrea_r

    Customer Care at Copyblogger Media and Studiopress

    That if is instead of the if you have in the first line of the code you pasted. 😉

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Multi Site Menu Problem’ is closed to new replies.
Skip to toolbar