Using Multiple Side Bars with an if/else statement
-
I need to set up my blog to use different sidebars based on post number. I modified my “single.php” file with the following code:
<?php
if (is_single(’30’))
get_sidebar30();
else get_sidebar();
?>I expected this to get “sidebar30” if post30=true, otherwise it would grab the standard sidebar. Well, the “else” part of the statement works, but the “if (is_single(’30’)) get_sidebar30();” returns a blank sidebar.
The only difference between sidebar.php and sidebar30.php is an iframe element grabbing an amazon product. But when I load post 30, the sidebar is completely blank.
Any ideas?
I’m using the theme “fluid-blue-10” with widgets enabled. Not sure if that makes a difference.
thanks,
Datamonkey
The topic ‘Using Multiple Side Bars with an if/else statement’ is closed to new replies.