• 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

Multiple menus on different pages

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 › Multiple menus on different pages

This topic is: resolved

Tagged: header right widget

  • This topic has 3 replies, 2 voices, and was last updated 9 years, 11 months ago by Doak Heggeness.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • July 17, 2015 at 3:34 pm #159680
    Doak Heggeness
    Member

    I need to put a second menu (secondary is fine ) in the #header-right widget on specific pages. I have registered a widget, but I am having trouble after that. I tried to 'unregister' the #header-widget and add a another one in an 'if' statement for a specific page, but they both showed. I have commented it out for the moment.

    Thanks,
    Doak

    add_action( 'genesis_header', 'dh_add_second_header_right_widget', 11 );
    function dh_add_second_header_right_widget() {
    	if (is_page('Services'))  {
    	   unregister_sidebar( 'header-right' );
    		  if (is_active_sidebar( 'header-right-2' ) ) {
     	              genesis_widget_area( 'header-right-2', array(
    		      'before' => '<div class="header-right-2">',
    		      'after'  => '</div>',
    	       ) );
            
            }
    }}	
    

    Doak Heggeness, WordPress Development | Website

    July 18, 2015 at 11:03 am #159726
    Christoph
    Member

    Hi Doak,

    not sure if this is possible in your setup but it seems easier to simply show a different secondary menu on those pages. (might just be a personal preference 😉 )

    Victor wrote a couple of posts about it:

    Use Conditional Secondary Menus in Genesis Themes


    http://victorfont.com/genesis-conditional-menus-revisited/


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

    July 19, 2015 at 3:15 pm #159825
    Doak Heggeness
    Member

    I think you are right. Thanks for the links, they are going in the right direction.

    I was planning on using the 'secondary' menu.


    Doak Heggeness, WordPress Development | Website

    July 20, 2015 at 9:34 am #159890
    Doak Heggeness
    Member

    To clarify, I would like to replace the header-right sidebar with the header-right-2 sidebar on specific pages. I have different menus for each sidebar..

    'header-right'' - primary
    'header-right-2 - secondary

    I wonder if I need to replace the header?

    I have 'unregisterd' the 'header-right' sidebar for the page
    http://spectrumlasertraining.com/solo/services/


    Doak Heggeness, WordPress Development | Website

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Multiple menus on different pages’ 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

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