When you register only one sidebar on the parent theme, then unregister it on the child theme, the sidebar goes away, but the menu still shows under appearance.
If i click on the “Widgets” menu the page appears as follow, with the right side entire blank.
I think this is a bug because the menu needed to go away too.
If you are referring to a custom menu, that has nothing to do with registered sidebars.
Hey Esmi, it is not a custom menu…
Even when there is no sidebars registered anymore, this menu should disappear, or not?
No, you can use menus in other places. However if you go to the menus it’ll tell you that the theme has no menu support.
This is not a regression, this is how it’s worked in 3.7 as well (isn’t it?)
Hi Mika, this is not about menu support, but sidebars 🙂
Take a look at this 2 pictures and you will know about what it’s going on.
in my opinion: the widgets menu still appear to inform that we have widgets.
I think so too, but it’s sort of a question of “Did we break things from 3.7?” or “This is something new we should do differently.” 🙂
A workaround is to run this in the child theme after unregistering sidebars:
unset( $GLOBALS['_wp_theme_features']['widgets'] );
This was previously addressed in #21761, but we didn’t consider child themes unregistering parent sidebars. Feel free to create a new ticket.
- The topic ‘Unregister_sidebar’ is closed to new replies.