Reply To: Custom blog_page.php

Homepage Community Forums Epik Theme Support Custom blog_page.php Reply To: Custom blog_page.php

#7519
dono2081
Customer

    Hi jennifer – ok, here’s the code I used. I put this in functions.php b/c I wanted these changes to be site wide:

    //* Reposition the primary navigation menu

    remove_action( ‘genesis_after_header’, ‘genesis_do_nav’ );
    add_action (‘genesis_before_header’, ‘genesis_do_nav’ );

    //* Reposition the secondary navigation menu
    remove_action( ‘genesis_before_header’, ‘genesis_do_subnav’ );
    add_action( ‘genesis_after_header’, ‘genesis_do_subnav’ );

    I think in my case the subnav actually appeared ‘above’ the main nav, so I had to do some re-thinking to make the terms ‘nav’ and ‘subnav’ make sense with what I did in the menus section of WordPress. (I think it might be backwards in Epik, not sure.)

    In the add_action section, you can replace ‘genesis_(before/after)_header’ with whatever hook you like, and you can look inside Genesis documentation for details on all the different ‘hook locales’ that appear on your theme. There’s even a plugin called ‘Genesis Visual Hook Guide’ to help out. Careful with the hook guide, tho’, b/c it doesn’t give you a fully-resolved class or id. You’ll have to dig deeper with firebug to get all the goodness. Don’t rely on the Hook Guide alone when you edit your CSS.

    As you already know (this is more for those who are new-ish), it doesn’t matter where you put these instructions; you can stick them anywhere within functions.php, as long as you don’t stick them in the middle of some other code (of course).

    What I do is just start a ‘Don’s customizations’ section at the bottom of the functions.php file, where I literally type:

    //* CUSTOMIZATIONS START HERE

    And then I add whatever elements I want; that way it’s easier to see what changes I made, they are all in the same place, blah blah.

    Lemme know if that works for you!
    -DonO