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 [//].
(@eddie-miller)
17 years, 9 months ago
I would like the comments section to only work in on category of my site.
Can I limit it’s display?