• 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

positioning new sidebar below header/before nav

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 › positioning new sidebar below header/before nav

This topic is: not resolved
  • This topic has 2 replies, 2 voices, and was last updated 13 years, 8 months ago by MissKitty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • February 14, 2013 at 6:15 pm #20427
    MissKitty
    Participant

    Using genesis-sample.

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

    #header
    #new-sidebar
    #nav and #subnav
    #content-sidebar-wrap

    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',
    'genesis_do_nav');

    // Move secondary nav menu
    remove_action( 'genesis_after_header', 'genesis_do_subnav' );
    add_action( 'genesis_before_content_sidebar_wrap',
    'genesis_do_subnav');
    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.

    February 17, 2013 at 6:25 pm #20908
    Brian Bourn
    Member

    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

    February 19, 2013 at 4:14 pm #21479
    MissKitty
    Participant

    Holy wow, that worked! You are a genius šŸ™‚

    Thank you Brian!

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