Hi,
I am new to developing themes and have run into a snag which I am not sure how to troubleshoot or fix.
In my functions.php I have put:
function quickchic_widgets_init() {
register_sidebar(array(
'name' => sprintf(__('A_%d'), $i )
,'id' => 'widget_$i'
,'before_widget' => ''
,'after_widget' => ''
));
}
add_action( 'init', 'quickchic_widgets_init' );
In my header.php I have the following snippet of code:
<div id='header_background'>
<?php dynamic_sidebar( 'A_0' ); ?>
<?php dynamic_sidebar( 'A_1' ); ?>
</div>
When I am in the Widgets Admin I can drag any plugins to either 'A_0' or 'A_1'. Say I drag the Text plugin to 'A_0', it displays, I type:
<em class='header_img'></em>
<em class='logo'></em>
I then save. I then go to the user site and it shows that this has been pushed over. However if I refresh the Widgets Admin page then the text widget is gone, and the A_0 widget still shows.
It is like it is always setting it to a new instance and not saving existing instances?
I tested this with other widgets including Calander, Enhanced Text, and Links - all with the same result.
Can you point me in the right direction.
Steve