A member of the Genesis community asked this question on the StudioPress community forums :
I just installed outreach pro. I want to remove from just the home page the footer and subfooter widgets. How can I do this?
All you need to do is add a conditional tag after the function on line 89 of the Outreach Pro themes functions.php file like this :
//* Add the sub footer section
add_action( 'genesis_before_footer', 'outreach_sub_footer', 5 );
function outreach_sub_footer() {
if ( is_front_page() )
return;
<pre><code>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 -->';
}
</code></pre>
}
How It Works
The following conditional tag, which has been added to the above code, ends the execution of the outreach_sub_footer function when the front page is loaded so the widgets don’t load on the front page.
if ( is_front_page() )
return;
return;
If called from within a function, the return statement immediately ends execution of the current function.
Leave a Reply