WordPress.org

Ready to get started?Download WordPress

Forums

Hiding the menu on the home page (11 posts)

  1. slowsoulz
    Member
    Posted 1 year ago #

    I would like to hide the menu on the home page but have the menu show on the other pages. I'm using Buddypress widget theme with I guess the Twenty Twelve child theme. My website is http://www.theoohwee.com The hope page currently shows a maintenance page. Because I don't want the "public" to see the menu."

    I have done searches and found this: http://wordpress.org/support/topic/hiding-horizontal-menu-on-home-page , but it didn't tell me where to put that code.

    I also found this: http://wordpress.org/support/topic/is-it-possible-to-hide-menu-completely-in-home-page?replies=4 , which was beyond me.

    I also found this: http://wordpress.org/support/topic/how-to-hide-home-link-in-nav-bar?replies=8 , but it didn't work.

    I also found this: http://wordpress.org/support/topic/how-do-i-remove-header-menu-from-home-page-only-1?replies=7 , but it didn't work either. I added it to the Twenty Twelve theme header.

    The hope page currently shows a maintenance page. Because I don't want the "public" to see the menu. Any help would be greatly appreciated!

  2. bcworkz
    Member
    Posted 1 year ago #

    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.

  3. slowsoulz
    Member
    Posted 1 year ago #

    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.

  4. esmi
    Forum Moderator
    Posted 1 year ago #

  5. slowsoulz
    Member
    Posted 1 year ago #

    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.

  6. Andrew
    Forum Moderator
    Posted 1 year ago #

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

  7. slowsoulz
    Member
    Posted 1 year ago #

    Andrew,

    You're trolling WordPress.org? SERIOUSLY?

  8. esmi
    Forum Moderator
    Posted 1 year ago #

    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.

  9. 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.

  10. Marventus
    Member
    Posted 1 year ago #

    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, :-)

  11. slowsoulz
    Member
    Posted 1 year ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Topic