Skip Navigation

[Resolved] Only allow logged-in users to comment

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to prevent Guest users from submitting comments.

Solution: Use WordPress configurations to restrict comments to logged-in Users only.

Relevant Documentation: https://www.wpbeginner.com/glossary/comment/#:~:text=Only%20Allow%20Registered%20Users%20to%20Com

This support ticket is created 3 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by Dee_DeeA2948 3 years, 4 months ago.

Assisted by: Christian Cox.

Author
Posts
#1879603

Hi. I have a page which displays a form, which allows front-end users to post. It works great, but right now anyone can comment.
On the original page, I have it setup so that the post group assigned is for logged-in users only. I’m happy that only the logged-in users can view this page and submit a post.

However, this is where my question comes. Anyone on the internet can add a comment on the post. Is there a way to make is to that only logged in users can add comments on that post type?
I’m getting random spammy comments and I’d like to only allow members to comment on posts.
Thank you for your help.

#1879661

Hello, I assume you're referring to the built-in WordPress Comments feature, not some other comments provided by a plugin, correct? If so, you can limit commenting via WordPress configurations as explained here:
https://www.wpbeginner.com/glossary/comment/#:~:text=Only%20Allow%20Registered%20Users%20to%20Comment&text=To%20do%20that%2C%20first%20you,to%20%E2%80%9CAnyone%20can%20register%E2%80%9D.&text=Under%20'Other%20comment%20settings'%20section,and%20logged%20in%20to%20comment%E2%80%9D.

Let me know if I misunderstood what you want to accomplish.

#1884665

Thank you! You understood exactly what I was looking to accomplish.
This works perfectly and I appreciate your help.

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