using conditionals to implement page specific sidebars
-
Can’t seem to get this to work…
I have 3 different widgetized sidebars that I’d like to implement, 2 on a certain page, and 1 on any other page.
First I added my sidebars to the functions.php file:
<?php if ( function_exists('register_sidebars') ) register_sidebars(3); ?>
…and I’m wondering how I give each a name instead of a number?
I’m setting this up for a client and it will be much easier for them to understand if it said “home sidebar” “store sidebar” etc., instead of “Sidebar 1”, “Sidebar 2” etc.
So I’m basing my code on this:
<?php if ( is_home() ) { ?> ///code for first sidebar/// </div> <?php } elseif ( is_page(’12’) ) ///code for second sidebar/// </div> <?php } else { ?> ///code for third sidebar/// <?php } ?> <?php endif; ?>
And combining it with:
<?php if ( is_home() || !dynamic_sidebar(1) ) : ?>
And ending up with something that doesn’t work…
Any ideas or a link to a proper implementation of this idea?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘using conditionals to implement page specific sidebars’ is closed to new replies.