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!
-
I’m using multiple widget ready bars in my theme, check out the functions.php
http://3dohio.com/wordpress/2007/08/14/wordpress-theme-black-and-tan/
I have tried this script and wordpress registers 4 widgets but still only one sidebar. All 4 widgets are being placed in the same sidebar. What do I need to do so that my theme recognizes 4 different sidebars?
Hey Jon marstonstudio… your website’s contact form isn’t working!
I have a couple sidebars working; but the formatting is off on the second. What could cause that?
the site is here:
http://fbcwaynesboro.org/wp – sidebar 2 on about pageI can also confirm that johnnyspade’s code worked great. Thanks for the info!
And to Otto, your response was pretty harsh. These are “Support” forums right? The people who post questions are trying already; don’t just tell them to try harder.
Is there a way to enable php code in text boxes provided by widgets? Also, when I used the categories widget, it made the first list item off to the top left of the rest of the items and it’s not bulleted like the others. I find that strange.
Cool! WordPress uses gravatars in their forums now!
Awesome! Thanks moshu, that worked wonderfully!
This should be marked as resolved. I’ve just carried out the steps outlined above by johnnyspade and it worked fine giving me two widgeted sidebars. Thank you.
- The topic ‘Using sidebar widgets in multiple sidebars’ is closed to new replies.