• I basically modified my template to work off just the header, index, and footer file. the sidebar is setup inside the index page. what i want to do is, if i’m leaving / viewing a comment i want the sidebar to contain different information. i’m not sure how wordpress determines if to show the comments or not so i tried a lil php with no luck

    <div id=”sidebar”>
    <?php if ($comments) : ?>
    comment content
    <?php else : ?>
    default content
    <?php endif; ?>
    </div>

    any ideas how to acomplish what i’m trying to do?

Viewing 3 replies - 1 through 3 (of 3 total)
  • You should probably use the if is_single
    more details: http://codex.wordpress.org/Conditional_Tags

    Thread Starter t0fu

    (@t0fu)

    thanks moshu, i was just coming back to note that i found that. 🙂

    Thread Starter t0fu

    (@t0fu)

    ok the conditional tags worked great but since its such a huge hunk of code i had to redo the template with a sidebar page. now my question is is it possible to throw the comments form into the sidebar under the single page conditional. i tried to mangle a version of it and when i submitted the comment the page cam back blank and no comment had been made.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘If Then’ is closed to new replies.