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>',
));}
//==============================================================//
?>
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