Minimum – Remove Secondary Menu from Homepage

Community Forums Forums Design Tips and Tricks Minimum – Remove Secondary Menu from Homepage

This topic is: not resolved

This topic contains 10 replies, has 3 voices, and was last updated by  braddalton 1 year, 6 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #64348

    netleaf
    Participant

    Hi there,

    I’m having quite an issue. For some reason, I can’t figure out how to remove the secondary menu from my homepage. Problem is that I want to keep it on all my pages BUT the homepage. I’ve tried many options, but none of them worked.

    Any help?

    The menu I am referring to is the one with the 4 pages where you can read “Analyse – Création Web – Référencement Web – Suivis”.

    Thanks!

    • This topic was modified 1 year, 6 months ago by  netleaf.
    • This topic was modified 1 year, 6 months ago by  netleaf.
    http://netleaf.ca/demo/
    #64366

    Susan
    Moderator

    Try this: wpsites.net/web-design/remove-nav-menu-specific-page/‎


    Susan @ Graphically Designing I offer theme customizations I tweet!
    I’ve taken up the challenge! – help me answer some of the unanswered posts

    #64389

    braddalton
    Participant
    #64476

    netleaf
    Participant

    Hi,

    Thanks for your replies. I tried many different options, but I keep getting an error.

    “Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘child_remove_genesis_do_subnav’ not found or invalid function name in /home/netleaf/public_html/wp-includes/plugin.php on line 406″.

    Sorry for my ignorance on that matter. Could I request a little more assistance please?

    Thanks!

    #64506

    braddalton
    Participant

    Try this:

    add_action(‘get_header’, ‘remove_genesis_do_subnav’);
    function remove_genesis_do_subnav() {
    if (is_home()) {
    remove_action(‘genesis_after_header’, ‘genesis_do_subnav’);
    }
    

    #64605

    netleaf
    Participant

    Hi braddalton,

    I tried this line of code and got this as an error:

    “Parse error: syntax error, unexpected $end in /home/netleaf/public_html/wp-content/themes/netleaf/functions.php on line 188″

    Edit: I just figured that the provided code missed a “}” at the end. There’s now no error, but the secondary menu is still there :/

    • This reply was modified 1 year, 6 months ago by  netleaf.
    • This reply was modified 1 year, 6 months ago by  netleaf.
    #64620

    braddalton
    Participant

    My bad. Sorry about that.

    Please copy the code below from the view raw link and paste it at the end of your child themes functions.php file using a text editor like Notepad++

    https://gist.github.com/braddalton/b9f816c59b6dbe52bd2d


    #64634

    netleaf
    Participant

    Still no luck.

    By the way, it seems that this menu is set as a primary menu. Keeping that in mind I tried to play around with the code, but still can’t figure how to get rid of it.

    If you really can find how to tweak this, you deserve a medal haha ;)

    #64642

    braddalton
    Participant

    If you’re referring to the menu with the black background, its the primary menu not the secondary which is why it doesn’t work.

    I tested the code and it works:

    https://gist.github.com/braddalton/6749242


    #64681

    netleaf
    Participant

    Still doesn’t work.

    Could I give you a temporary access so you could take a closer look at it?
    That would be really appreciated.

    #64693

    braddalton
    Participant

    It works because i tested it locally.

    You can use the contact form on my site if you want to hire me for small job.


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

You must be logged in to reply to this topic.