Created
February 24, 2013 12:52
-
-
Save braddalton/5023716 to your computer and use it in GitHub Desktop.
This code removes all your widgets from all widget areas on your home page. You can change the conditional tag to disable widgets from loading on specific pages etc.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'sidebars_widgets', 'remove_homepage_widgets' ); | |
function remove_homepage_widgets( $sidebars_widgets ) { | |
if ( is_home() ) | |
$sidebars_widgets = array( false ); | |
return $sidebars_widgets; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment