
Ever wanted to be able to remove your widgetized areas (Sidebar, most of the time) on your blog homepage, but don’t feel like editing your theme files? No problem, here is the solution.

Ever wanted to be able to remove your widgetized areas (Sidebar, most of the time) on your blog homepage, but don’t feel like editing your theme files? No problem, here is the solution.
To do so, simply add the following code to your functions.php file:
<?php
add_filter( 'sidebars_widgets', 'disable_all_widgets' );
function disable_all_widgets( $sidebars_widgets ) {
if ( is_home() )
$sidebars_widgets = array( false );
return $sidebars_widgets;
}
?>
That's all, no more widgetized areas are displayed on your homepage.
Credits goes to Justin Tadlock for this awesome recipe!
9 Responses
Thanks for sharing great recipe.
Nice tip to bypass edition of index file. Thanks for sharing.
That’s easy to follow and save a lot of time.
Nice, I know with my niche sites, widgetized sidebars sometimes get in the way. Nice tip.
Sweet & simple
hmm… thank you
Hmmmm. This didn’t work for me. The widgets still show up. Is there a way to do this by excluding certain ID’s?
I am using the Vina templete. How do I determine if there is a default setting in the template?
I’d appreciate the help sooooo much!
Thanks,
Zak
Trackbacks: