On many WordPress sites the post meta is displayed below the title on the main blog page, the single post page and sometimes the archive page. This is the data that displays the author, date and number of comments.
Recently I was working on a project where some posts were going to have comments but others were not. Comments were going to be allowed on a post by post basis. I wanted to hide the comments link part of the post meta on posts were comments were not allowed but display it on ones that did have comments.
In your template(s), you will have code that looks like this:
<?php comments_popup_link( 'No comments yet', '1 comment', '% comments', 'comments-link', 'Comments are off for this post'); ?>
You will want to change this to the following:
<?php if ( comments_open() ) : comments_popup_link( 'No comments yet', '1 comment', '% comments', 'comments-link', 'Comments are off for this post'); endif; ?>
This code is saying to only display the comments in the post meta, if the comments are open.
If you would like assistance making modifications like this to your site, please contact me.
photo credit: mastermagnius
Ashish says
That is cool but u can also use nofollow plugins if SEO is your concern