• Resolved Ryan

    (@ryannutt)


    I’m working on a couple of themes with sidebars and have come across something that I’m sure is something simple I’m missing. I just don’t know what it is.

    There are 4 sidebars, created using register_sidebar() at the top of the functions.php file. They all show up fine in the Widgets settings page and when I drag widgets onto them they’ll show up in the sidebars on the actual site.

    The problem is when I go back to the Widgets settings page all 4 sidebars are empty. If I don’t drag anything onto them the sidebars on the site still look correct. Both the themes that I’ve done do this but the default theme doesn’t so I’m pretty sure it’s something I’m just missing.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Perhaps something else within the themes is interfering with the Widget display? I’d start by deactivating all plugins then removing any and all javascript from the themes. If that didn’t work, I’d start pulling functions out of functions.php (apart from register_sidebar obviously). It’s going to be down to a slow process of elimination, I think.

    Thread Starter Ryan

    (@ryannutt)

    It’s on a development server without any activated plugins aside from what functions.php does. But that’s a good idea to start commenting out each plugin call and see if anything fixes it.

    I was thinking – hoping is probably a better word – that there was some call I was missing that loaded / saved the widgets.

    register_sidebar() is all you need.

    Thread Starter Ryan

    (@ryannutt)

    Figured it out, although I’m not sure I understand why. I had sidebars named Right Side, Footer Left, Footer Middle, and Footer Right so I put their ids at rightSide, footerLeft, footerMiddle, and footerRight. The ids are what caused the problem. When I changed the ids to themename-sidebar-1, themename-sidebar-2, etc they worked.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Widgets empty when trying to edit’ is closed to new replies.