Hey Simon!
That’s coming from your WordPress theme.
By default, custom post types will be rendered using your Theme’s single.php file, which I’m assuming includes the comments template functions.
To remove this, you can simply copy single.php to single-testimonial.php and remove the unwanted code — there isn’t a way for us to do this from within the plugin for you!
Alternatively, you could attempt to hide it via CSS — that would be a bit of a workaround, IMHO.
I hope this helps!
All the best,
Richard
Thanks for the reply, I have copied the single.php to single-testimonial.php but there is no comment code within that template. How to a trace where to comments are being added from? The single-testimonial.php works as I can add content to it and it shows with the single testimonial but theres no comment section to remove?
<?php
get_header();
?>
<!-- #content Starts -->
<?php woo_content_before(); ?>
<div id="content" class="col-full">
<div id="main-sidebar-container">
<!-- #main Starts -->
<?php woo_main_before(); ?>
<section id="main">
<?php
woo_loop_before();
if (have_posts()) { $count = 0;
while (have_posts()) { the_post(); $count++;
woo_get_template_part( 'content', get_post_type() ); // Get the post content template file, contextually.
}
}
woo_loop_after();
?>
</section><!-- /#main -->
<?php woo_main_after(); ?>
<?php get_sidebar(); ?>
</div><!-- /#main-sidebar-container -->
<?php get_sidebar('alt'); ?>
</div><!-- /#content -->
<?php woo_content_after(); ?>
<?php get_footer(); ?>
I went with css in the end but still would like to know about removing the comments in the single-testimonial.php as above.
.single-testimonial #post-author,
.single-testimonial #comments,
.single-testimonial #respond {
display: none;
}
Hey Simon!
OK, I see that’s a WooThemes template, so chances are they’ve added their comments in a more custom way (perhaps in one of their woo_ functions.) It could be inside the template part that matches this particular template (so you will want to dig around in your themes template parts and look for the matching one, probably named content-something.php.)
I hope that helps!
All the best,
Richard