• We’re getting a lot of spam on media posts and I’m trying to figure out how to disable the comments on those posts only.

    When my client uploads an image with the media library it creates a new post, those posts have an area to comment and they are getting hit pretty hard with spam.

    Thoughts?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Try creating attachment and/or image templates in the theme that simply don’t include a comment form.

    Thread Starter chelpixie

    (@chelpixie)

    I would love to but the Media Library doesn’t have an option to turn off comments on these uploads.

    Step by step:

    Go to Media -> Add new. Once it uploads then you can go to Media -> Library. When I click on the title it goes to an edit image page. When you over over the image title it brings up the view link which takes you to a blog post page. The images are being added as blog posts and I either need that to stop or need to stop the spam comments from attaching to the images.

    Any help would be appreciated.

    the Media Library doesn’t have an option to turn off comments on these uploads.

    You don’t need to turn comments off. Just create an attachment and/or image template that doesn’t include a comment form or a comments list.

    I am new to WordPress, I have similar spam problem. How do you create an attachment and/or image template?

    Thanks
    ~D

    This is an ongoing problem and it’s getting worse as more spammers find out about this weakness issue.

    I have hundreds of media entries in a photo journal. There is not a comment template for these images. Is there any way to fix this other than to edit each individual one with PhPMyAdmin to change comment from open to closed?

    Something like this should take care of it in PHPMyAdmin. Go to the SQL tab for wp_posts and run the following command*:

    UPDATE wp_posts SET ping_status = replace(ping_status, 'open', 'closed') WHERE post_type = 'attachment';

    Or if you want to turn of pings/trackbacks for all posts, remove the WHERE statement at the end:

    UPDATE wp_posts SET ping_status = replace(ping_status, 'open', 'closed');

    *DISCLAIMER: Use at your own risk. Mucking around in PHPMyAdmin is an easy way to screw things up. It is advised that users test out changes on a non-production installation of WordPress (a test site) before using them on a live site. If you break something due to a typo in my command or negligence on your own part, don’t come crying expecting sympathy.

    That didn’t work for us, but this did:
    UPDATE wp_posts SET ping_status=’closed’;
    UPDATE wp_posts SET comment_status=’closed’;

    Although, if you want comments on regular pages you’ll have to turn them back on.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘exclude comment on media posts’ is closed to new replies.