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:
[Widget Text Area]
[Secondary Navigation] (not on every page)
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?
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?
You must be logged in to reply to this topic.
Subscribe to get early access to new themes, discounts and brief updates about what's new with StudioPress!