Skip to content

Instantly share code, notes, and snippets.

@cre8tivediva
Last active March 26, 2019 02:04
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save cre8tivediva/82c95ced4cd7721f07c80c73db74ab40 to your computer and use it in GitHub Desktop.
Outreach Pro - Display Sub-Footer Left and Sub-Footer Right Home Page only
//* Add the sub footer section
add_action( 'genesis_before_footer', 'outreach_sub_footer', 5 );
function outreach_sub_footer() {
if ( is_active_sidebar( 'sub-footer-left' ) || is_active_sidebar( 'sub-footer-right' ) ) {
echo '<div class="sub-footer"><div class="wrap">';
genesis_widget_area( 'sub-footer-left', array(
'before' => '<div class="sub-footer-left">',
'after' => '</div>',
) );
genesis_widget_area( 'sub-footer-right', array(
'before' => '<div class="sub-footer-right">',
'after' => '</div>',
) );
echo '</div><!-- end .wrap --></div><!-- end .sub-footer -->';
}
}
//* Add the sub footer section
add_action( 'genesis_before_footer', 'outreach_sub_footer', 5 );
function outreach_sub_footer() {
if ( ! is_home() ) {
return;
}
if ( is_active_sidebar( 'sub-footer-left' ) || is_active_sidebar( 'sub-footer-right' ) ) {
echo '<div class="sub-footer"><div class="wrap">';
genesis_widget_area( 'sub-footer-left', array(
'before' => '<div class="sub-footer-left">',
'after' => '</div>',
) );
genesis_widget_area( 'sub-footer-right', array(
'before' => '<div class="sub-footer-right">',
'after' => '</div>',
) );
echo '</div><!-- end .wrap --></div><!-- end .sub-footer -->';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment