• Ok, here’s what I’m trying to do. On my homepage’s sidebar, I’ve got a bunch of items. On individual posts, I’d like only a smaller subset of those items to be shown.

    I THINK I should use something like this

    <?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>

    But it doesn’t seem to be working. Any suggestions?

Viewing 4 replies - 1 through 4 (of 4 total)
  • You could try with this, which should display stuff unless it’s a single post page.

    <?php if(!is_single()) { ?>
    stuff
    <?php } ?>

    Actually, mattbramanti, that should work with no problems if implemented correctly. I was using the same tag, but I ended up with so many conditional tags that the sidebar loaded as long as a second after everything else. Since they were conditions of individual page templates, I simply put the whole sidebar content in those page templates, rather than calling the default sidebar. However, to answer your question, are you using the whole syntax, as eridan showed? For example, are you closing the argument with the <?php } ?> tag?

    Thread Starter mattbramanti

    (@mattbramanti)

    Doh. I had a typo in the php close tag. Cripes, it’s always something like that, you know? ??

    Anyway, thanks for all the help!

    :o) Figured it had to be something like that! Glad to see you got it working.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Excluding sidebar items w/ conditional tags’ is closed to new replies.