i have closed comments in a page still the below lines are displayed in the page .How can i disable these lines . someone please help me !
Posted on October 12, 2010 by sankar
Comments Off | Edit
Comments are closed.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What version of WP are you using?
In WP 3+ (and maybe earlier) you just go to the Dashboard, click Pages, click Edit for the page in question, scroll down to the section labeled Discussion, and deselect the Allow comments & Allow trackbacks & pingbacks boxes. Then trash any comments attached to the Page.
If you actually meant Post rather than Page, then Paul is correct in that a minor edit to the theme will be necessary. NOTE: whenever possible, do this with a Child Theme so you don’t accidentally hammer the main theme.
Assuming you are using WP 3 and the default Twenty Ten theme, edit wp-content/themes/twentyten/comments.php (or create a child theme, copy comments.php, and then continue).
comments.php, line 70, reads:
Change it to read:
That effectively kills the line after it which is where “Comments are closed” is output, but without just deleting it completely. Obviously, if you are using a different theme you’ll have to hunt down the appropriate line in comments.php for yourself.
Note that this is a quick-and-dirty hack which will affect all posts. You’ll have to do something a little more involved if you only want to do this for selected posts.