Skip Navigation

[Resolved] unwanted comments for custom post type

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 5 replies, has 2 voices.

Last updated by Waqar 1 year, 10 months ago.

Assisted by: Waqar.

Author
Posts
#2380465

I have a custom post type (Events) that I set up with Toolset. Even though each Event post has no section for comments on its webpage, I've had some spam comment show up in my Comments section. I have no idea how they got there if there is no place for comments to be entered on the actual post.

I've tried to look into disabling ALL comments for the custom post type (rather than one by one) but it looks like I need to add a custom code function to do this? I guess I'm just checking that this is the only way - it seems very rudimentary.

So, two questions:
1) How do I make sure that all comments are not allowed for this custom post type (as a setting, rather than individually)
2) How has a spammer added comments when there is no user interface for the spammer to add the comments?

Unfortunately, I already deleted the comments, so I can't show you them, but it's only been happening with Events, like this one:
hidden link

Thanks,
Amy

#2381153

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Amy,

Thank you for contacting us and I'd be happy to assist.

1) How do I make sure that all comments are not allowed for this custom post type (as a setting, rather than individually)
- First, please make sure that the "Comments" item is unchecked in the 'Events' custom post type's settings (WP Admin -> Toolset -> Post Types).

Screenshot: hidden link

But, if comments have already been turned on for any individual posts/events, this alone won't be enough and you'll also have to disable them in bulk, as explained in this guide:
hidden link

2) How has a spammer added comments when there is no user interface for the spammer to add the comments?
- Even if you're not showing the comment form on the individual post/event page, if the comments are allowed/turned on for a posts/events, spammers/bots can still post a comment by exploiting the WordPress comment URL/file directly at {yourwebsite.com}/wp-comments-post.php.

Once you've disabled/turned off the comments for all posts/events, this will no longer be a threat.

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#2383025

Thank you for responding. I think what is confusing to me is that the "Comments" item was unchecked from the beginning when I set up the custom post type. It's never been on.

So I don't understand how your assurance that "Once you've disabled/turned off the comments for all posts/events, this will no longer be a threat" can be accurate. The comments were turned off, and yet this happened.

Am I missing something?

#2383661

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thanks for writing back.

> So I don't understand how your assurance that "Once you've disabled/turned off the comments for all posts/events, this will no longer be a threat" can be accurate. The comments were turned off, and yet this happened.

> I'm afraid, I have no means to know how the comments settings were previously set on your website or which plugins were in use, which may have affected the comment settings. I shared this assurance in the context that you've followed the steps from the WPBeginner article to explicitly turn off the comments for all posts in that post type ( as shared in the reply to the first question ).

I can understand that the comments management settings in WordPress can be confusing as there is more than one place to control them. There are global settings at WP Admin -> Settings -> Discussion and there are settings on the individual post/page edit screens for the post types where the comments are enabled.

And the added challenge is that the global settings don't retrospectively go back and turn the comments off for the posts where they may have been turned on previously and you have to do that either manually or through a third-party plugin.

I'll highly recommend going through that article from WPBeginner to better understand the comment management settings in WordPress, in general. These settings are not something specific to Toolset plugins.

#2383871

You can close out the thread, although my question hasn't really been resolved. I had already turned the comments off in two places - in the general WP settings and also in the individual custom post type (Events) when I set up the website. Somehow, spam comments got through despite those settings. I'll just have to keep an eye on it moving forward. At least all comments need to be approved, so I can delete them when they appear.

#2383881

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

I'm going to mark this ticket as resolved, but here is what I'll recommend if you see a comment posted for one of those posts again.

Without deleting the comment, you can start a new ticket and include a link to this ticket for the background information. This will allow us to troubleshoot and suggest the next steps, accordingly.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.