Editing the Comment Link Code
-
Hi, I hope I am posting this question in the right section of the forum. Basically, the problem I am having is with a free theme I am using. The comment link at the bottom of posts shown on the main page (as opposed to a single post’s page) only shows up when there is at least one comment. When there aren’t any comments, no link to leave a comment is shown unless you go to the post’s page, where a comment box is displayed. I would like the comment link to display “0 comments” instead of disappearing.
I think the relevant section of code is as follows:
if($post->comment_count > 0) { echo ' | '; if($post->comment_count > 1) { echo '<a href="#comments">' . $post->comment_count . ' Comments</a>'; } else { echo '<a href="#comments">1 Comment</a>'; } }
What do I need to change to get the comment link to work the way I want it to?
Thanks in advance!
- The topic ‘Editing the Comment Link Code’ is closed to new replies.