Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 112726

ChrisDLA on "different sidebars for each page--this should work?"

$
0
0

This is the relevant part of my page.php:

<?php if($options['sidebar_layout'] == 'one-left-sidebar' or $options['sidebar_layout'] == 'two-left-sidebar'): ?>

<?php if( is_page('Services') ) : ?>
<?php get_sidebar('3'); ?>
<?php elseif( is_page('2') ) : ?>
<?php get_sidebar('brokerage'); ?>
<?php elseif( is_page('3') ) : ?>
<?php get_sidebar('5'); ?>
<?php elseif( is_page('4') ) : ?>
<?php get_sidebar('5'); ?>
<?php elseif( is_page('7') ) : ?>
<?php get_sidebar('5'); ?>
<?php elseif( is_page('20') ) : ?>
<?php get_sidebar('5'); ?>
<?php elseif( is_page('5') ) : ?>
<?php get_sidebar('6'); ?>
<?php else : ?>
<?php get_sidebar(); ?>
<?php endif; ?>
<?php endif; ?>

This is my sidebar-3.php:

<?php
/*
@package WordPress
@subpackage multi-color
*/
?>
<?php global $options; ?>
<div id="sidebar-3" class="sidebar widget-area">
    <?php if(!dynamic_sidebar('sidebar-3')) : ?>
<font face="Tahoma">text goes here
 </font>
    <?php endif; ?>
</div>

Only my default sidebar shows. Any ideas? Thanks.


Viewing all articles
Browse latest Browse all 112726

Trending Articles