positioning new sidebar below header/before nav

Community Forums Forums Design Tips and Tricks positioning new sidebar below header/before nav

This topic is: not resolved

This topic contains 2 replies, has 2 voices, and was last updated by  MissKitty 2 years, 9 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #20427


    Using genesis-sample.

    I registered a new sidebar, which I want it to display BELOW the #header, above the #nav, like so:

    #nav and #subnav

    However, the new sidebar renders below #nav as opposed to above #nav.

    This is the code added to sample-child functions.php file to register the new sidebar, and position new sidebar:

    // Register new widget area
    genesis_register_sidebar( array(
    ‘id’ => ‘after-header-info’,
    ‘name’ => __( ‘After Header Info’, ‘genesis-sample’ ), ‘description’
    => __( ‘This is a widget area that can be placed after the header,
    full width, for information’, ‘genesis-sample’ ),) );

    //now tell theme where to display it – can also add using simple hooks instead of this

    add_action( ‘genesis_after_header’,
    ‘child_after_header_info_sidebar’ ); function
    child_after_header_info_sidebar() { echo ”; dynamic_sidebar(
    ‘after-header-info’ ); echo ”; }
    I also I tried moving my nav menu to just above the content-sidebar-wrap, but that placed the nav menu INSIDE OF the #inner div / genesis-before-content-sidebar:

    //move primary nav
    remove_action( ‘genesis_after_header’, ‘genesis_do_nav’ );
    add_action( ‘genesis_before_content_sidebar_wrap’,

    // Move secondary nav menu
    remove_action( ‘genesis_after_header’, ‘genesis_do_subnav’ );
    add_action( ‘genesis_before_content_sidebar_wrap’,
    So, two questions:
    1. How to display my new sidebar directly below #header, and above #nav

    2. When I use hook reference  genesis_before_content_sidebar_wrap,
    code is rendered INSIDE content-sidebar-wrap, as opposed to immediately before the content-sidebar-wrap div.
    Thanks in advance.


    Brian Bourn

    Just add a priority on the first line like below so your new widget area will “fire” before the nav or subnav.

    add_action( ‘genesis_after_header’, ‘child_after_header_info_sidebar’, 1 );

    Bourn Creative | bourncreative.com | Twitter



    Holy wow, that worked! You are a genius :)

    Thank you Brian!

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

You must be logged in to reply to this topic.