• I’ve read and re-read the ‘Conditional Tags’ page of the Codex but still can’t figure out how to achieve what I want.

    I’ve registered a new sidebar named ‘Blog Widget Area’ that I want to appear on every page of my site containing posts (front_page, single, category, archive, etc.) — basically every page except for ‘home’ and ‘page’ I was instructed to replace the get_sidebar tag in my page.php with conditional tags but nothing I’ve tried is working.

    Any help is much appreciated. For reference, here’s my page: http://www.cleverpapers.com/index.php/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter PitaMaria

    (@pitamaria)

    Here’s the code I’ve tried in my child sidebar.php file. The ‘if’ is working but the ‘else’ is not. Please help!

    <?php
    if (!is_home() || !is_page())
        {get_sidebar(dynamic_sidebar( 'Blog Widget Area' ));
        get_sidebar(dynamic_sidebar( 'secondary-widget-area' ));}
        else
           {get_sidebar(dynamic_sidebar( 'secondary-widget-area' ));}
    ?>
    Thread Starter PitaMaria

    (@pitamaria)

    bump … Can anyone help with this issue?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘using conditional tags for sidebar’ is closed to new replies.