• 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

Secondary nav is showing twice

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 › Secondary nav is showing twice

This topic is: not resolved

Tagged: Altitude Pro, secondary nav

  • This topic has 3 replies, 2 voices, and was last updated 8 years, 5 months ago by oceansize.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • August 14, 2017 at 5:55 am #210330
    oceansize
    Participant

    Hi,
    I'm creating a membership website using WP eMember and the Altitude Pro Genesis theme. I would like the second navigation to only show when members are logged in.

    Now I have got this to work to a certain extent (the secondary nav appears when you log in and disappears when you log out) but unfortunately this secondary nav still shows on the website (even when you are not logged in) but in a different location in the site header section. Here's my code for the second navigation:

    remove_action( 'genesis_after_right', 'genesis_do_subnav');
    function show_members_menu() {
    	if ( wp_emember_is_member_logged_in() ) {
    		echo '<div class="nav-secondary"><div class="wrap">';	
    		wp_nav_menu( array( 'menu' => 'logged-in-members' ) );
    		echo '</div>';
    				}
    };
    add_action( 'genesis_header_right', 'show_members_menu' );

    Any advice would be welcome, thanks.
    P.S. Here's a picture that probably explains the problem better.

    https://www.sportyandfriends.com/
    August 15, 2017 at 3:40 am #210381
    oceansize
    Participant

    I've managed to solve the issue. I just had to unregister the secondary navigation and that got rid of my secondary navigation showing twice and my members navigation still appears when they log in.
    (https://my.studiopress.com/documentation/snippets/navigation-menus/unregister-the-secondary-navigation-menu/)

    Dan

    August 15, 2017 at 6:26 am #210383
    Victor Font
    Moderator

    You probably didn't have to unregister it. You most likely had it the menu selected for the secondary nav location in the menu editor. All you had to do was uncheck location the box.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    August 23, 2017 at 3:34 am #210664
    oceansize
    Participant

    Thanks for your help Victor. I've come across a new problem now with my second navigation. Everything works fine but the second navigation completely looses it's css styles and position when you change the view of the website from mobile to full screen (when the menu goes from menu-toggle to the normal-visitor-menu).

    Any advice would be welcome.
    Dan

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

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

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 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