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.
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.
You'll need to edit the line that displays that out of your template.
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:
if ( ! comments_open() ) :
Change it to read:
if ( 0 && ! comments_open() ) :
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.