Step 1:
Removing the code of front page 1 widget areas from altitude_front_page_widgets() function. This function is locating in front-page.php file.
1 2 3 4 5 6 7 |
genesis_widget_area( 'front-page-1', array( 'before' => '<div id="front-page-1" class="front-page-1"> <div class="image-section"> <div class="flexible-widgets widget-area' . altitude_widget_area_class( 'front-page-1' ) . '"> <div class="wrap">', 'after' => '</div></div></div></div>', ) ); |
Step 2:
Creating an new function and putting the above code in this function. Here is the complete code of that function. You will add this function above the genesis() function of front-page.php file
1 2 3 4 5 6 7 8 9 |
function altitude_front_page_section_1() { genesis_widget_area( 'front-page-1', array( 'before' => '<div id="front-page-1" class="front-page-1"> <div class="image-section"> <div class="flexible-widgets widget-area' . altitude_widget_area_class( 'front-page-1' ) . '"> <div class="wrap">', 'after' => '</div></div></div></div>', ) ); } |
Step 3:
Now I am moving the front page 1 widget area above the <header> markup. So I chose the “genesis_header” hook. Using this same hook Genesis Framework is loading the opening structural markup for the header. Priority of the opening markup of <header> HTML5 tag is 5. So I am using the priority 3 and it will call the altitude_front_page_section_1() function before the genesis_header_markup_open() function.
Put this single line of code just below the if ( is_active_sidebar( ‘front-page-1’ ) ) { statement.
1 |
add_action( 'genesis_header', 'altitude_front_page_section_1', 3 ); |
Step 4:
Add this new code in your style.css file
1 2 3 |
.home .site-header { position: relative; } |
Leave a Reply