everytime I make a change to any widgets in admin they disappear - sometime just from admin, sometimes from the frontend and sometimes both.

I get them back by adding update_option( 'sidebars_widgets', $null ); to the bottom of functions.php - then I can see them in admin as 'inactive widgets'. Then I manually re-add them all in admin - it's very frustrating!

I'm using Canvas with a custom child theme. I added a new widget area by adding

// Underhome widget area
if ( function_exists('register_sidebar') ){
    'name' => 'Underhome widget',
    'id' => 'underhome_widget',
    'description' => "A widget area underneath the home page content",
    'before_widget' => '<div id="underhome">',
    'after_widget' => '<div class="fix"></div></div>',
    'before_title' => '<h3 class="title">',
    'after_title' => '</h3>',

to functions.php

Then I created a page template and added

<!-- dislay the underhome widget -->
<?php if ( dynamic_sidebar('underhome_widget') ) : endif; ?>

I can't see anything wrong with this? maybe it is unrelated?

Anyway I'm totally stuck does anyone has any suggestions apart from changing career?

  • 3
    "any suggestions apart from changing career" hehe ... yes, I have: Deactivate all plugins. Comment out everything in your child themes functions.php (add return at the beginning). Then reload and see if works. If it does, move the return down by one function. Reload > Move down > and so on until you got the conflicting function. Also check your console (in the dev tool bar).
    – kaiser
    Oct 3 '13 at 2:26
  • 1
    morktron, WP_DEBUG deserves some care. I've made a couple of demotivators for ya ;)
    – brasofilo
    Oct 3 '13 at 5:45
  • nice work Brasofilo!
    – morktron
    Oct 9 '13 at 22:36

It's likely not anything you are doing wrong but, rather, a misbehaving plugin. There is a lot of ugly code out there that causes widget zones to freak out on the admin side.

Try killing all of your plugins first, do you still have the problem? If not, turn them back on a few at a time until you find the culprit.

If you have access to your PHP log, clear the log and refresh the page. Pull your log, get rid of all the PHP Strict Standards warnings that are everywhere since 3.6, and what's left probably contains your error.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.