- This topic has 1 reply, 2 voices, and was last updated 4 years, 6 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Support › Forums › Flex Theme › Adding a full width section before pre-footer
I need to add a section just before the footer-widgets area only specific pages but not the home page. I added teh widget area and was going to add this code to the right area:
if (is_page(“Water”)) {
if( is_active_sidebar(‘pre-pre-footer’) ):
genesis_widget_area( ‘pre-pre-footer’, array(
‘before’ => ‘<div class=”pre-pre-footer” id=”pre-pre-footer”>’,
‘after’ => ‘</div>’,
) );
endif;
}
I don’t know which file I would add this too. Please help thanks!
Add this code in your functions.php file
add_action('genesis_before_footer', 'gd_pre_pre_footer', 3 );
function gd_pre_pre_footer() {
if (is_page("Water") )
return;
if( is_active_sidebar('pre-pre-footer') ):
genesis_widget_area( 'pre-pre-footer', array(
'before' => '<div class="pre-pre-footer" id="pre-pre-footer">',
'after' => '</div>',
) );
endif;
}
I am using “genesis_before_footer” hook and set the priority 3. It will add the new widget area above the footer widget areas if have any.