condition based dynamic sidebar
-
Ok I’m kinda new to coding with php. But what I’m trying to do is have a particular dynamic sidebar active on a particular page only if that sidebar is active. If it’s not active I wish it to load the sidebar that is used on the rest of the site. but I can’t for the life of me figure out how to code it.
I have the following, but it doesn’t seem to be working.
<?php if ( is_page(190) ) { ?> <?php if ( !function_exists('dynamic_sidebar') && is_sidebar_active('forum_sidebar') || !dynamic_sidebar('forum_sidebar') ) : ?> <?php endif; ?> <?php } else { ?> <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(1) ) : else : endif; ?> <?php } ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘condition based dynamic sidebar’ is closed to new replies.