• I want some info on my sidebar.php to show only on the index page.

    I’m using this, but it does not seen to work


    <?php if (!$single) { ?>
    Info on the sidebar.php not showing in single posts pages
    <?php } ?>

    that’s on WP 2.0

    any comments?

Viewing 4 replies - 1 through 4 (of 4 total)
  • You mean basically you want your sidebar on only the index page, right?

    If I’m right, you’ll want to do this.

    <?php if (is_home()) { side bar content } ?>

    <?php if (is_single()) { single side bar content } ?>

    <?php if (is_page("archives") || is_archive() || is_search()) { all other pages side bar content } ?>

    <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
    have info link or whatever in here
    <?php } ?>

    Try that – hopefully it pasted ok

    Thread Starter Gianko

    (@gianko)

    @direkt: nope, I have the sidebar on all pages but I don’t want the “Recent Post” list on the index.

    Thanks a lot.. I was using WP 1.2 tags!!! ??

    BTW, I’m using asides, is there any way to make those poste not to show in the get_archives() post listing?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hide Something in the sidebar on single pages’ is closed to new replies.