Jump to content
Sign in to follow this  
asmusa

Unregistering not needed Sidebars in Admin Widget area

Recommended Posts

asmusa

I like to unregister sidebars that are not needed in the PlatformPro theme so that they don't show up in the Admin under Widgets - any help is greatly appreciated

Share this post


Link to post
Share on other sites
cmunns

In your child functions.php file add this function ` function remove_some_widgets(){ // Unregsiter some of the PlatformPro sidebars unregister_sidebar( 'sidebar-2' ); //sidebar secondary unregister_sidebar( 'sidebar-3' ); //sidebar tertiary unregister_sidebar( 'sidebar-4' ); //etc unregister_sidebar( 'sidebar-5' ); //etc unregister_sidebar( 'sidebar-6' ); unregister_sidebar( 'sidebar-7' ); unregister_sidebar( 'sidebar-8' ); unregister_sidebar( 'sidebar-9' ); unregister_sidebar( 'sidebar-10' ); unregister_sidebar( 'sidebar-11' ); } add_action( 'widgets_init', 'remove_some_widgets', 11 ); ` This will leave just the Primary Sidebar

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×