Support » Plugins and Hacks » Where Did My Custom Widget Content Go?

Where Did My Custom Widget Content Go?

  • I created a set of four widget areas in my functions.php file. Widget areas show up in my admin=>widgets

    Added code to call the widgets in the theme. Works great.

    Created a widget. It shows up in the widgets. I can drag the widget into the new widget area, add my content; works beautifully.

    Problem: When I return to the admin=>widgets page, the custom widget is no longer in the widget sidebar area.

    Screen Shot: http://awesomescreenshot.com/0fbjp1r08

Viewing 2 replies - 1 through 2 (of 2 total)
  • After extensive trouble shooting I’ve concluded my home grown widget is a-ok. The code calling my widget areas is a-ok.

    Problem is the widget areas in the admin won’t retain any widget placed within?!

    `if (function_exists(‘register_sidebar’)) {
    ‘name’=> ‘Silver Info Box’,
    ‘id’ => ‘catBox-2’,
    ‘before_widget’ => ‘<li id=”%1$s” class=”widget %2$s”>’,
    ‘after_widget’ => ”,
    ‘before_title’ => ‘<h2 class=”offscreen”>’,
    ‘after_title’ => ‘</h2>’,


    Figured it out, can you?

    Answer: The ID should be all lowercase alphanumeric characters and not contain white space. You can also use the – and _ characters.


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Where Did My Custom Widget Content Go?’ is closed to new replies.