Skip to content

Instantly share code, notes, and snippets.

@braddalton
Created February 24, 2013 12:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save braddalton/5023725 to your computer and use it in GitHub Desktop.
Save braddalton/5023725 to your computer and use it in GitHub Desktop.
Prevents widgets from loading on a specific page. Change the page i.d or conditional tag.
add_filter ('sidebars_widgets', 'remove_specific_pages_widget');
function remove_specific_pages_widget( $sidebars_widgets ){
if (is_page('007'))
$sidebars_widgets ['sidebar'] = false;
return $sidebars_widgets;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment