This topic has 7 replies, 4 voices, and was last updated 7 years by mike1.

  • Author
  • #20350
     rudik2
    Participant

    Hi,
    i use menu item visibility control plugin to hide menu, but in mobile i see menu rectangle still.
    Please look in print screen.
    http://s1.postimg.org/69fkph4v3/zdjecie_1.jpg

    How to hide this for not logged users?

    #21056
     Abe
    Keymaster

    Hi, that will show since is the container of the menu and not a link you have added a condition to.
    Hide that using css media query:

    COPY CODE
    
    
    @media only screen and (max-width: 480px) {
     .contain-to-grid {
        display: none;
    }
    }
    
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #22360
     rudik2
    Participant

    Thank you Abe, code working, but when user is logged he don’t see menu in mobile. It is possible to display menu for only logged members??

    #22362
     Abe
    Keymaster

    Hi, that implies some php coding and some conditionals to be added in header.php. Please try hiring a developer to help you with that

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #34764
     FD
    Participant

    rudik2: You can use the is_user_logged_in() function.
    Read more about it here: http://codex.wordpress.org/Function_Reference/is_user_logged_in

    Example:

    <?php if ( is_user_logged_in() ) { ?>
    HTML code for logged in users
    <?php } ?>

    #122946
     mike1
    Participant

    I also need to hide the menu container if user isn’t logged in, I’ve tried that code but can’t get it to work… anyone know how to do this?

    #123682
     Abe
    Keymaster

    HI, this topic is very old. Try to open a new one or talk with your developer since it required a bit of PHP knowledge

    Cheers

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #123927
     mike1
    Participant

    Ok thanks Abe, my question is relevant to this thread so I don’t see the purpose of opening a new thread, but I will ask my developer for help. Many thanks.

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘How to hide menu in mobile for not logged in.’ is closed to new replies.

Log in with your credentials

Forgot your details?