Viewing 10 replies - 1 through 10 (of 10 total)
  • Moderator bcworkz

    (@bcworkz)

    Under what conditions should the menu display, if any? Only logged users? Only users with certain roles? And on all other pages, again, display to whom? As it is, I’ll assume you want the menu to not display on the home page for all users, and display on all other pages for all users.

    The menu display originates from the theme header.php template with the function wp_nav_menu(). You would precede it with the conditional if(!is_front_page()). You would edit the version in your child theme’s folder. If it does not exist there, copy it from the twentytwelve folder so that it does exist.

    If need be, someone here can help you further with the contents of the conditional if you can better describe when the menu should display.

    Thread Starter slowsoulz

    (@slowsoulz)

    bcworkz,

    Sorry about that. When I wrote this help request I took my time and tried to give as much info as possible but I guess I forget that question. YES, I would like the menu only available to logged in users.

    Thread Starter slowsoulz

    (@slowsoulz)

    Esmi,

    Thanks but I’m not a coder so all this code doesn’t mean much to me. Much more advanced. And I’m sure it’s not as difficult as that page displayed. At least I hope it’s not that difficult.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    If you can’t make customisations by coding, consider hiring someone to do it for you http://jobs.wordpress.net

    Thread Starter slowsoulz

    (@slowsoulz)

    Andrew,

    You’re trolling WordPress.org? SERIOUSLY?

    No – Andrew isn’t. He is a respected regular on these forums who posted a quite serious suggestion which I will now echo. If you cannot manage this yourself, perhaps you need to consider hiring someone to carry out the work for you.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Edit: Esmi beat me to the reply by 29 seconds. 😉

    Less coffee perhaps? More walking? Andrew is just making a suggestion regarding coding. Nothing more and he is definitely not “trolling”. 😉

    YES, I would like the menu only available to logged in users.

    And I’m sure it’s not as difficult as that page displayed. At least I hope it’s not that difficult.

    That requires some coding and Esmi linked you to the correct article. It’s not something that is necessarily hard if you know how to do it. If you don’t then there is alway the option of getting someone to do it for you. Thus the link Andrew provided.

    Hello, there.
    Guys, if I may, and given that slowsoulz is telling us he doesn’t know PHP, perhaps a CSS approach would be more suitable to him:

    body.home.logged-in #access {
    display: none;
    }

    Oh, and slowsoulz, just because someone recommends you to get hired help, it doesn’t mean they are trolling. There’s a lot of things that could go wrong when you try to make changes to a website and don’t know a lot of code, which is why both Andrew and esmi recommended getting help from a professional. They only have your best interest in mind, and so do the rest of us, 🙂

    Thread Starter slowsoulz

    (@slowsoulz)

    i find it INTERESTING that I initially gave you four examples of people who had the same question that got it answered FOR FREE. Yet I am being told to PAY FOR IT. Interesting …

    I’m far from an expert in PHP but I do know a little about it. And given or shown the right code I could figure it out. The examples I posted initially, DIDN’T WORK FOR ME. But doesn’t mean I can’t get this fixed.

    I guess PICKING AND CHOOSING who to help FOR FREE and who to CHARGE is just a whim. MY BAD.

    @marventus, I will try your suggestion. Thanks!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Hiding the menu on the home page’ is closed to new replies.