This topic has 6 replies, 2 voices, and was last updated 10 years by Laura.

  • Author
  • #95893
     tom70
    Participant

    How to hide the menu for non-logged in users on all pages?
    I only want this done with php code.

    #96077
     Laura
    Moderator

    Hello, you can use this php code at header.php in child theme ( copy the main theme file then paste it at child theme, then add the code)

    COPY CODE
    
    <?php if ( is_user_logged_in() ) { } else { ?>
    <style  type="text/css" media="screen">
    ul#menu-sweetdate {
        display: none;
    }
    </style>
    <?php } ?>
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #96079
     tom70
    Participant

    I paste it. Its not working.
    Could you look at it? Please..

    FTP:
    videodates.dk
    videodat
    6u2s18KbrX

    #96545
     Laura
    Moderator

    Hello, do you have any cache plugin or csn? if so, please clean cache

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

    Yes I have. I wil try and see..

    #96698
     tom70
    Participant

    Did as you said, and its perfect now. Thx..

    #96930
     Laura
    Moderator

    Hello, glad it worked! 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?