I want a different sidebar on the "blog" pages than the static pages (1 post)

  1. Wish Web Geek
    Posted 3 years ago #

    I want a different sidebar on my blog pages than I have on my static pages.
    I tried this code in sidebar.php, but it was just a guess and it doesn't work. I don't know of any conditional tag for blog posts when the front page is a static page...

    <?php if (is_page($blog)) { ?>
    <li><?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Blogsidebar') ) : ?><?php endif; ?></li>
    		<?php } else { ?> 
    <li><?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar') ) : ?><?php endif; ?></li>
    		<?php } ?>
    I also tried adding this code to the bottom of my blog template
    <?php get_blogsidebar(); ?>

    if I put that in the template, do I have to define it in my functions document?


Topic Closed

This topic has been closed to new replies.

About this Topic