Display different sidebars on different pages
-
Hey all,
I have registered 2 side bars called ‘Index’ and ‘News’, both of which are displaying and accepting widgets just fine. The porblem is that by using
get_sidebar('Index');
orget_sidebar('News)';
I am still only presented with the first sidebar that was registered, ‘Index’. I’m wondering if anybody has any pointers or can see an error in the way that I am doing this?Thanks.
I’m regestering them like this –
if(function_exists('register_sidebar')){ register_sidebar( array( 'name' => 'Index', 'before_widget' => '', 'after_widget' => '', 'before_title' => '<h4>', 'after_title' => '</h4>', ) ); register_sidebar( array( 'name' => 'News', 'before_widget' => '', 'after_widget' => '', 'before_title' => '<h4>', 'after_title' => '</h4>', ) ); }
and here is my sidebar.php file –
<div id="contentRightCol"> <?php if(function_exists('dynamic_sidebar')) dynamic_sidebar(); ?> </div>
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Display different sidebars on different pages’ is closed to new replies.