Skip Navigation

[Resolved] How should I do to permit to create only a post for user into a CPT?

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

Problem:

I'm trying to create a form where the registered users can create only one post per user. With the Views plugin I was able to do that but, what should I do to do that using the Blocks plugin?

Solution:

It is the same workflow in Toolset View block, for example:

https://toolset.com/forums/topic/how-should-i-do-to-permit-to-create-only-a-post-for-user-into-a-cpt/#post-2007955

Relevant Documentation:

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/Hong_Kong (GMT+08:00)

This topic contains 6 replies, has 2 voices.

Last updated by francescoG-3 1 year, 7 months ago.

Assigned support staff: Luo Yang.

Author
Posts
#2007613

Tell us what you are trying to do?
Hi, I'm trying to create a form where the registered users can create only one post per user. With the Views plugin I was able to do that but, what should I do to do that using the Blocks plugin?

Also, Does the Membership system built with Toolset supports the Automatic Renewal of the membership bought?

#2007955

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Loop-Template.JPG
author-filter.JPG

Hello,

It is the same workflow in Toolset View block, for example:
Create a page, insert a new Toolset View block:
- Query your custom post type
- find and and select above view block
in section "Content Selection", add a author filter, see my screenshot author-filter.JPG
- find and select "View Loop" block, in section "Loop Template", in option "No Items Found Text", display your post form shortcode, see my screenshot Loop-Template.JPG
- in view's loop, display the post information

Please elaborate the question with more details:
What kind of "Automatic Renewal of the membership bought" do you want?

#2009107

Ok, I have followed your guide. What should I do to select that the author can create only one post, in limit and offset > item to display=1?

For "Automatic Renewal of the membership bought" I want that, if I set that the membership is monthly, the member would pay the membership monthly as the same, and using, the PayPal automation payments method.

#2010151

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Q1) Yes, you are right, you can setup the option to: "in limit and offset > item to display=1"

Q2) There isn't such kind of built-in feature within Toolset Forms plugin, you can add a feature request for it:
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/
Our developers will evaluate it.

#2011309

Thank you Luo.
I have another question about creating only a post for a user into a CPT.
I have put a link where the author of the post can put it in trash. If he put in trash the post and tries to create a new one, can it do that or not? If no, because the post in trash is seen as an existing post for the author, is there a way, using a query filter, to do permit the user to create a new post?

#2011511

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Yes, it is possible, you can add a post status filter into the view: post status = "publish"
https://toolset.com/documentation/user-guides/views/filtering-views-query-by-post-status/
So view will query those post in "publish" status, if there isn't any result, then display the Toolset post form

#2013107

My issue is resolved now. Thank you!