• 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

Adding content next to the secondary navigation and best practices

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 › Adding content next to the secondary navigation and best practices

This topic is: not resolved

Tagged: overriding genesis, Secondary Navigation, widget areas

  • This topic has 1 reply, 1 voice, and was last updated 13 years, 6 months ago by alipica.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • January 20, 2013 at 3:58 pm #13340
    alipica
    Member

    Hello,

    I've only been working with the Genesis framework for a shot period of time and I apologize in advance if I've not quite wrapped my head around some of the concepts. That said, I'm having trouble achieving the effect I want. I'm using a plugin that turns my secondary page menu into the primary page sub navigation. I need a widget area and subnav-container to be on every page but I'll be removing the subnav itself from pages that don't need it. I need it to be structured more or less like this:
    <div id="subnav-container">
    <div class="wrap">
    [Widget Text Area]
    [Secondary Navigation] (not on every page)
    </div>
    </div>
    In writing the above, I realized that I could probably do this by changing the genesis_do_subnav function found in genesis/lib/structure/menu.php. I ended up adding 'before' and 'after' args to the array. This seems to have done the trick and now I can style and float the areas so they sit next to each other.

    The only problem I see now is that I've modified a genesis file rather than a child theme file. How can I move these changes to the child theme so that they overwrite genesis? I've tried adding it to the child theme using the same file structure. Is there a best-practice way to do this that I haven't discovered yet?

    January 20, 2013 at 4:11 pm #13345
    alipica
    Member

    Alright, it appears that adding the before and after args to genesis_do_subnav didn't actually add the html to the page, but it did add the sidebar widget area. Is there a way to echo it onto the page? One of the args says 'echo'  => 0. I'm not sure what the 0 is specifying. Any help?

    My args looked like this:

    'before'         => '<div id="subnav-container"><div class="wrap"><div class="inner-menu">' .dynamic_sidebar( 'subnav-content' ). '</div>'

    'after'             => '</div></div>'

    Obviously, it didn't work. I've been researching filters, but I'm still not confident on how to use them. Would a filter be a better method for this?

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 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