Support » Alpha/Beta/RC » Unregister_sidebar

  • Resolved hugw


    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.

Viewing 8 replies - 1 through 8 (of 8 total)
  • esmi


    Forum Moderator

    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.

    With sidebar registered, everthing goes fine:
    But, if i unregister it, the menu should disappear, but instead we get a widgets page with no sidebar to drag:

    What happens today on 3.7.1?

    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.” 🙂

    Moderator Sergey Biryukov


    WordPress Dev

    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.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Unregister_sidebar’ is closed to new replies.