Add an Additional Wrapper to my Header Div

Community Forums Forums Design Tips and Tricks Add an Additional Wrapper to my Header Div

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  David Chu 1 year ago.

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

    jeremi_liwanag
    Member
    Post count: 14
    /** 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

    #72309

    David Chu
    Participant
    Post count: 1409

    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

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

You must be logged in to reply to this topic.