Skip Navigation

[Resolved] Restrict users from submitting more than 1 post.

This support ticket is created 5 years, 9 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 5 years, 9 months ago.

Assisted by: Christian Cox.

Author
Posts
#1198064

Tell us what you are trying to do?
I've created a Custom Post Type. I don't want users to submit more than 1 post (for this post type). I want to restrict them from being able to submit more than 1 post (using this custom Post Type).

I'm not sure how to accomplish this. I sincerely appreciate your help.

#1198254

Hi, one way to do this is to use a View of this CPT filtered by post author, where the post author is the current logged-in User. In the View's Loop editor, remove all content from the wpv-loop tags. In the wpv-no-items-found section, place your Form shortcode. Now your View is effectively a conditional that shows the Form if no posts exist by the current User, or shows some other content (or nothing) if the User is already the author of one of these posts. The documentation link below contains an FAQ item that discusses this approach:
https://toolset.com/documentation/post-relationships/how-to-create-custom-searches-and-relationships-for-users/#how-do-i-prevent-users-from-creating-more-than-one-contractor-post
Let me know if you have questions about that.

#1202088

My issue is resolved now. I found this support ticket: https://toolset.com/forums/topic/cred-before-save-data-allow-only-one-submition-of-the-form/
Thank you!