Adding content next to the secondary navigation and best practices

Community Forums Forums Design Tips and Tricks Adding content next to the secondary navigation and best practices

This topic is: not resolved

This topic contains 1 reply, has 1 voice, and was last updated by  alipica 1 year, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #13340

    alipica
    Participant
    Post count: 2

    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?

    #13345

    alipica
    Participant
    Post count: 2

    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?

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.