Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

In the widgets section, on the right-hand side where it lists all the sidebars, if I drag a text widget over (or any widget) and add "Test" on the title and "test" on the body and then save, it will show up on the front end but once the widgets page refreshes, when I expand the sidebar again where the text widget (or any widget I've added) is, it's empty. After the initial reload, the widgets show up under inactive widgets but not to the right where they should be.

So in essence, you add a widget to sidebar area, you save it and the change takes place on the front end, and I do see it live. However, when I go back to the dashboard / widget area and expand the box, it's empty. The text widget (or any widget I've placed in the sidebar area) is now located in the inactive area.

All custom widget / side panels on the dashboard, upon page reload, lose all their inner content and get placed on the inactive area. Yet after this change, when you reload the front end, theyr'e still there. This is only happening on custom widgets, not the initial default ones WordPress uses.

If you need any other information, let me know.

Edit

This is all that is in my functions.php file.

<?php 
ob_start();

function number_of_responses(){
printf( _n('One Response to %2$s' , '%1$s Responses to %2$s', get_comments_number()),
get_comments_number(), get_the_title());
}
//initialize sidebar.
if(function_exists('register_sidebar')){
    register_sidebar(
        array(
            'name' => 'Widget Area' ,
            'id' => 'widget-area',
            'before_widget' => '<li class ="widget-container>"',
            'after_widget' => '</li>',
            'before_title' => '<h3 class="widget-title">',
            'after_title' => '</h3>'
        )
    );}

//this one controls the excerpt length in words
function custom_excerpt_length( $length ) {
    return 15;
}
add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );

//this adds the "read more" to the post 
function new_excerpt_more($more) {
       global $post;
    return '<span class="readMore"><a href="'. get_permalink($post->ID) . '"> Read the Rest...</a></span>';
}
add_filter('excerpt_more', 'new_excerpt_more');


//here we add code to "widgetize" an area of the page.

// 1st extra sidebar for footer
if (function_exists('register_sidebar')) {
    register_sidebar(array(
        'name'=> 'footer-sidebar 1',
        'id' => 'regSideBar',
        'before_widget' => '<li id="%1$s" class="widget %2$s">',
        'after_widget' => '</li>',
        'before_title' => '<h2 class="offscreen">',
        'after_title' => '</h2>',
));}


////================= THESE WIDGETS ARE FOR THE PROGRAMS BOX. =======================================//
//// programs box widget 1
if (function_exists('register_sidebar')) {
    register_sidebar(array(
        'name'=> 'progBox widget 1',
        'id' => 'progcell1',
        'before_widget' => '<li id="%1$s" class="widget %2$s">',
        'after_widget' => '</li>',
        'before_title' => '<h2 class="offscreen">',
        'after_title' => '</h2>',
));}

//// programs box widget 2

if (function_exists('register_sidebar')) {
    register_sidebar(array(
        'name'=> 'progBox widget 2',
        'id' => 'progcell2',
        'before_widget' => '<li id="%1$s" class="widget %2$s">',
        'after_widget' => '</li>',
        'before_title' => '<h2 class="offscreen">',
        'after_title' => '</h2>',
));}

//// programs box widget 3

if (function_exists('register_sidebar')){ 
    register_sidebar(array(
        'name'=> 'progBox widget 3',
        'id' => 'progcell3',
        'before_widget' => '<li id="%1$s" class="widget %2$s">',
        'after_widget' => '</li>',
        'before_title' => '<h2 class="offscreen">',
        'after_title' => '</h2>',
));}


//// programs box widget 4

if (function_exists('register_sidebar')){ 
    register_sidebar(array(
        'name'=> 'progBox widget 4',
        'id' => 'progcell4',
        'before_widget' => '<li id="%1$s" class="widget %2$s">',
        'after_widget' => '</li>',
        'before_title' => '<h2 class="offscreen">',
        'after_title' => '</h2>',


));}

//==============================================================//
?>
share|improve this question
Without some code from your functions file, it may be hard to trouble-shoot this. Have you tried creating a new sidebar (possibly replacing an old one) and seeing if the problem persists? Have you tried deactivating all your plugins and then reconfirming the problem? – mrwweb Apr 28 '12 at 16:25
well ill update the post in a bit but there literally are...its a brand new themse so there arent any plug ins aside from default Askimet and hello dolly and both are deactivated. – somdow Apr 28 '12 at 16:30
Is the register_sidebar() hooked onto an action? – mrwweb Apr 28 '12 at 16:50
If you add braces around register_sidebar() to meet WordPress coding standards (codex.wordpress.org/WordPress_Coding_Standards#Brace_Style) does that resolve the issue? Also, double-check that each id is unique. – mrwweb Apr 28 '12 at 16:57
You need to re-write your question to make it comprehensible. – Wyck Apr 28 '12 at 17:28
show 3 more comments

closed as too localized by toscho Mar 18 at 23:58

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

1 Answer

Why not try changing the ID of your footer sidebar to something else like footer-sidebar

if (function_exists('register_sidebar')) {
    register_sidebar(array(
        'name'=> 'footer-sidebar 1',
        'id' => 'footer-sidebar',
        'before_widget' => '<li id="%1$s" class="widget %2$s">',
        'after_widget' => '</li>',
        'before_title' => '<h2 class="offscreen">',
        'after_title' => '</h2>',
));}

I have the same experience and my problem was I named sidebar as sidebar 1, sidebar 2 etc. Please try my suggestion and see if it works.

share|improve this answer

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