• 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

Add an Additional Wrapper to my Header Div

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 › Add an Additional Wrapper to my Header Div

This topic is: not resolved

Tagged: customization, header, theming, wrap

  • This topic has 1 reply, 2 voices, and was last updated 12 years, 4 months ago by David Chu.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • November 9, 2013 at 7:49 pm #71931
    jeremi_liwanag
    Member
    /** Reposition header outside main wrap */
    remove_action( 'genesis_header', 'genesis_header_markup_open', 5 );
    remove_action( 'genesis_header', 'genesis_do_header' );
    remove_action( 'genesis_header', 'genesis_header_markup_close', 15 ) ;
    
    add_action( 'genesis_before', 'genesis_header_markup_open', 5 );
    add_action( 'genesis_before', 'genesis_do_header' );
    add_action( 'genesis_before', 'genesis_header_markup_close', 15 );

    -------------------------------------------------------------------

    The above code re positioned my header div outside the main wrap div.
    By default it looks like this:

    <div class="wrap">
    <header></header>
    <div class="inner"></div>
    <div class="footer"></div>
    </div>

    after putting the above code in functions.php the structure will look like this:

    <header></header>
    <div class="wrap">
    <div class="inner"></div>
    <div class="footer"></div>
    </div>

    What im asking now is:

    Is it possible to add a new div wrapper in my header div?
    I want the structure to look like this:

    <div class="header-wrap"><header></header></div>
    <div class="wrap">
    <div class="inner"></div>
    <div class="footer"></div>
    </div>

    Thanks!


    Your online success is our business http://www.systemise.com.au

    November 11, 2013 at 9:07 am #72309
    David Chu
    Participant

    Hi,
    Sure, you could just write your own function that echoes your first bit of code, and then one after the other genesis_before items to echo the close of your DIV. Just keep them in proper order, more or less like so. I trust that you can figure out how to write a function.

    add_action( 'genesis_before', 'jeremi_first_bit' );
    add_action( 'genesis_before', 'genesis_header_markup_open', 5 );
    - blah blah
    - blah blah
    add_action( 'genesis_before', 'jeremi_last_bit' );

    Dave


    Dave Chu ยท Custom WordPress Developer – likes collaborating with Designers

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