WordPress.org

Ready to get started?Download WordPress

Forums

Is there a way to turn-off comments on one page? (6 posts)

  1. Ron Fredericks
    Member
    Posted 6 years ago #

    I have comments turned on and my theme allows me to have comments on pages as well as posts - no problems here. But on some pages, I would like turn off comments with a note like "comments closed" for a particular page or post.

    Any ideas?

    fyi:
    The button to turn off comments and pingbacks in a page or post admin edit tool turns off the display of all existing comments - In my case I want the existing comments to be visible, but deactivate future comments with a little note if possible.

    Best regards,

    Ron

  2. bradstinyworld
    Member
    Posted 6 years ago #

    there are several plugins that will allow you to do this and if I had more coffee in me I probably could give you a few by name, but alas it is still early. A general search ought to hook you up unless you are a wordpress.com user

  3. alanft
    Member
    Posted 6 years ago #

    you should be able to edit the "discussion" status in both posts and pages. (in 2.5 open 'Comments and Pings" under the advanced options. pre 2.5 it's in the narrow posting sidebar)

    so long as your theme is set up to recognise comments and the status of comments/pings in pages you should be fine.

  4. Joni
    Member
    Posted 6 years ago #

    Well another way to do it would be to dupe the page.php file and strip out the call to the comments.php template. And when you want a page where you know you don't want comments, choose that page template instead.

  5. alanft
    Member
    Posted 6 years ago #

    no need to do that. plenty of themes should have the right code to see when you have closed comments on a page. something like

    if ('open' == $post->comment_status) {comments_template();}

  6. Joni
    Member
    Posted 6 years ago #

    I agree. But sometimes -- well for me, ALWAYS -- I dislike even the remotest hint of a comment on a page. That's for static content, IMHO. Anyway, just another way to skin a cat. (Sorry, Sunny!)

Topic Closed

This topic has been closed to new replies.

About this Topic