Metro primary nav displaying twice

Community Forums Forums Design Tips and Tricks Metro primary nav displaying twice

This topic is: not resolved

This topic contains 4 replies, has 3 voices, and was last updated by  LauraB 10 months, 1 week ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #53784

    TeeTide
    Participant
    Post count: 9

    I used the following code snippet to move the Metro header and primary nav.

    /** Reposition header outside main wrap */
    remove_action( 'genesis_header', 'genesis_header_markup_open', 5 );
    remove_action( 'genesis_header', 'genesis_do_header' );
    remove_action( 'genesis_header', 'genesis_header_markup_close', 15 ) ;
    
    add_action( 'genesis_before', 'genesis_header_markup_open', 11 );
    add_action( 'genesis_before', 'genesis_do_header', 12 );
    add_action( 'genesis_before', 'genesis_header_markup_close', 13 );
    
    /** Reposition primary navigation outside main wrap*/
    remove_action( 'genesis_after_header', 'genesis_do_nav', 16 );
    add_action( 'genesis_before', 'genesis_do_nav', 17 );
    

    Now the nav is showing twice – once where it originally was and once where I intended it to show:

    The issue can be seen at

    Can one of you gurus tell me what I’ve done wrong here?

    Thanks in advance.

    #53785

    RobG
    Participant
    Post count: 1036

    Please post the link for the website in question to speed up the process.


    To speed up the process please post the link to the website in question.

    We recommend using Firebug to view source codes http://getfirebug.com/

    RobGoss WordPress Developer
    We build WordPress websites for your business or personal goals
    http://www.robgoss.com / Follow me Twitter / https://twitter.com/robgoss

    #53823

    TeeTide
    Participant
    Post count: 9

    I tried to post it but the link didn’t post. Trying again:

    http://dothanalabama.com/metro/

    #53833

    RobG
    Participant
    Post count: 1036

    Try accessing Appearance > Menu- There you can just remove the secondnary or the primary menu. I’m assuming you added the menu right over your content correct? If that the case just remove the top menu.

    It’s always a good idea to first see how the menus work this way you will have a better understanding how to apply the changes you need.


    To speed up the process please post the link to the website in question.

    We recommend using Firebug to view source codes http://getfirebug.com/

    RobGoss WordPress Developer
    We build WordPress websites for your business or personal goals
    http://www.robgoss.com / Follow me Twitter / https://twitter.com/robgoss

    #63425

    LauraB
    Participant
    Post count: 14

    TeeTide, I had a similar problem. I was able to resolve it by adjusting the priorities.

    When the add_action for the menu was too close in priority to the remove_action I had the problem. By assigning the add_action a much later priority (for me 20 worked) I was able to get rid of the second menu. See example.

    `//* Reposition the primary navigation menu

    remove_action( ‘genesis_after_header’, ‘genesis_do_nav’ );

    add_action( ‘genesis_before’, ‘genesis_do_nav’, 20 );’

    Unclear to me why this works, you think if the priority was a just simply a later number it should work. But I offer it in case it helps you.

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

You must be logged in to reply to this topic.