Remove Comment Form from Pages

Viewing 7 posts - 1 through 7 (of 7 total)
  • #2155
    TNS
    Participant

    Hello,

    I am developing a “web magazine” out of this theme and one thing that I want to do is to be able to remove the comment form for pages only. For example, I want users to be able to comment on posts but on my “about” page or the “contact” (http://www.thenewsignificance.com/comments-queries) page it makes no sense to have a comment form. Is there a way to turn comments off for pages only or to remove code from a specific template?

    Thank you for your support…

    #2156
    Daniel Tara
    Keymaster

    You can turn off comments for all pages under Settings > Discussion

    #2157
    TNS
    Participant

    I’m not sure you have given an answer for my problem — although it very well may be and I am just confused. If so please help me understand.

    In my original post above I am asking how to keep comments on for **posts** — but turn them off on **pages** only. The example I gave above was that it makes no sense for me to have a comment form on my contact page and likewise for my donations page — but I want to keep comments on for posts, not turn them off for everything (which is what I understand your reply above will do.)

    Apologies if I am making you repeat yourself. If I am missing something I just need a little more explanation.

    Thank you for your time — it is very much valued!

    #2158
    Daniel Tara
    Keymaster

    I remembered there was a setting to turn off comments for all pages, but I see there’s only an option for all comments.

    Well, what you can do is either use a plugin like [url=http://wordpress.org/extend/plugins/page-comments-off-please/]Page Comments Off Please[/url] or delete the function comment_form() from comments.php. I recommend the first option.

    #2159
    TNS
    Participant

    Excellent, exactly what I was looking for — thank you!

    I do have one follow up question though. How do I now remove the box and text “comments closed” that now appear on the page?

    #2160
    Daniel Tara
    Keymaster

    Remove this portion of code from comments.php:

    <?php else : // comments are closed ?>
    	<!-- If comments are closed. -->
    	<p class="nocomments"><?php _e('Comments are closed.','cover-wp') ?></p>
    #2161
    TNS
    Participant

    Thank you. Worked like a charm!

Viewing 7 posts - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.