• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Double Primary navs in Modern Portfolio Pro child theme

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Double Primary navs in Modern Portfolio Pro child theme

This topic is: resolved

Tagged: Two Primary Navs by accident in Modern Portfolio Pro

  • This topic has 6 replies, 3 voices, and was last updated 6 years, 7 months ago by asbilly92.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • June 17, 2016 at 2:02 pm #187761
    asbilly92
    Participant

    Have an odd thing for some reason right from the get-go my primary-nav was outside of the header. in this new site (is NOT UP yet live 😉 ). I need it to be inside the header and be the last item in the header. I added the following code into my .functions.php file and like magic I got 2 primary navigations lol! Ummm nice but not what I want. I want to KEEP the primary-nav that is inside the header and get rid of the one that's just outside of the header area. Any help is appreciated, maybe I'm missing something kinda easy that I'm overlooking?? Not sure bur grew frustrated with it!!

    /*Reposition the primary navigation menu */
    remove_action( 'genesis_before_header', 'genesis_do_nav' );
    add_action( 'genesis_header', 'genesis_do_nav', 12 );
    

    For now on the one that ended up outside the header I added css of display:none, - that affected the first nav too so on that one I added: display:initial so it would still show!

    The site isn't live yet but here is a screenshot of the 2 navs in Developer Tools ...Showing both Primary Navs

    http://not live site yet
    June 18, 2016 at 7:26 am #187789
    Christoph
    Member

    Hi,

    if two primary navigations are showing, your remove_action is not targeting the right hook.

    Try remove_action( 'genesis_after_header', 'genesis_do_nav' ); instead.


    https://www.christophherr.com | Genesis Customizations | Buy me a coffee

    June 20, 2016 at 5:34 am #187856
    asbilly92
    Participant

    OK great thank you, I had tried that before and it showed the same thing, two primary - navs; but to make sure I just tried it again. Same result, still have 2 navs showing...

    I wonder if maybe this has something to do with the dashboard settings as far as the primary nav menu? I can't remember now how the nav bar was set up right out of the box... but I'm almost positive there was no 'extra' code in the functions file targeting the primary nav...

    June 20, 2016 at 5:52 am #187858
    Genesis Developer
    Member

    Can you share the code of functions.php file via pastebin.com. We shall check the code once.


    Download Genesis Featured Posts Combo Widget | Simple Grid Layouts Plugin for Posts, CPTs and terms
    You can request new tips/help.

    June 20, 2016 at 6:06 am #187859
    asbilly92
    Participant

    Sure! I will work on that now and post back when it's uploaded 😉

    Thanks!!

    June 20, 2016 at 6:20 am #187860
    asbilly92
    Participant

    Here it is: functions.php file for double nav issue

    June 21, 2016 at 10:17 am #187954
    asbilly92
    Participant

    Ok geeze, I figured it out! I realized that it was only showing up on the home page, never even thought of that!

    I removed the following from the .front-page.php file:

    //*Make the primary nav show on home page also
    add_action( 'genesis_after_header', 'genesis_do_nav', 9 );

    Kinda silly, but I never noticed that problem was only on the home page... hope this helps someone else... the joys of wordpress lol!

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Double Primary navs in Modern Portfolio Pro child theme’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble