Text widget data not being retrieved upon Edit
-
Greetings! I’ve got a stickler of a problem for everyone today.
I searched for how to register sidebars so that I could create dynamic sidebars on particular pages. This is the code I’ve used to do so:
(in functions.php)
if ( function_exists('register_sidebar') ) { register_sidebar(array( 'name' => 'Testimonials', 'id' => '1', 'before_widget' => '', 'after_widget' => '', 'before_title' => '<h4>', 'after_title' => '</h4>', ));
(in sidebar.php)
if ( is_page(38)) { dynamic_sidebar('Testimonials'); }
This has worked fine. The problem occurs when I place a text widget into that sidebar in the Appearance->Widgets section. The text widget goes into the sidebar, gets edited, gets saved and then shows up on the webpage as it is meant to (this is not the problem, ?? ).
After this, if I go to Appearance->Widgets, all the text boxes within the widgets disappear. It seems that the data for the widgets is not being retrieved from the database, even though it’s being used on the page properly. Following this, the database data is then overwritten with the blank widgets, thus losing the text widget.
The problem is not what’s being put into the text widgets – I put “I hope this deletes” into a text widget and it was not retrieved once I edited the widgets in Appearance->Widgets. The problem is that data is not being retrieved and displayed on the Widgets page. Any help?
- The topic ‘Text widget data not being retrieved upon Edit’ is closed to new replies.