Using sidebar widgets in multiple sidebars
-
I’m having trouble getting sidebar widgets to work in multiple sidebars. I have widgets working correctly in one sidebar. I changed the code in functions.php to the following
if ( function_exists('register_sidebars') ) register_sidebars(2, array('name'=>'Sidebar %d'));
And I now see Sidebar 1 and Sidebar 2 in my admin screen. The first sidebar (which was already working) still shows up. But when I add the following code in the sidebar.php file, to call the second sidebar widget, both sidebars and the main content disappear:
<?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(1) ) : else : ?>
Any ideas? I haven’t been able to find any clear instructions for using widgets in multiple sidebars, I looked at the API documentation on the Automattic site, but I’m pretty new to PHP, so I may be missing something.
Thanks in advance for any help!
- The topic ‘Using sidebar widgets in multiple sidebars’ is closed to new replies.