WordPress.org

Support

Support » How-To and Troubleshooting » comments_template()

comments_template()

Viewing 3 replies - 1 through 3 (of 3 total)
  • something like

    <?php if (the_category = blog);

    echo ‘ comments_template(); ‘

    else

    echo ‘ ‘

    ?>

    think I got it – but I couldn’t work out how to get the

    <?php // comments_template(); ?>

    in the statement so dumped it into another file and called it via a template….

    <?php
    $post = $wp_query->post;
    if ( in_category(‘3’) ) {
    include(TEMPLATEPATH . ‘/comments_blog_only.php’);
    } else {
    echo ”;
    }
    ?>

    How can I put <?php // comments_template(); ?> in to the include(TEMPLATEPATH . ‘/comments_blog_only.php’); ?

    This code:
    <?php // comments_template(); ?>
    is commented out = //.
    So it will never do anything, unless you remove the 2 slahes [//].

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