multiple widget areas with conditionals?
-
I’m using conditional statements in sidebar.php do get different widget areas to display depending when page you are on. For some reason, no matter what page I’m on this code will only show sidebar-2.
` <?php if ( is_single() || is_archive()) : ?>
<?php if ( !dynamic_sidebar( ‘sidebar-1’ ) ) : // begin primary widget area ?><?php endif; ?>
<?php else : ?>
<?php if ( !dynamic_sidebar( ‘sidebar-2’ ) ) : // begin primary widget area ?><?php endif; ?>
<?php endif; ?>`Any thoughts?
- The topic ‘multiple widget areas with conditionals?’ is closed to new replies.