I have already setup a CPT for my users. I have setup a Gravity Forms form to allow them to create a CPT entry, and I would like to now do the following:
1 - Show the user a page that lists the CPT entries they have created.
2 - Allow the user to edit or delete a CPT entry they have created.
Is there a way to do this with Toolset?
Thanks
Hi, Toolset's CRED system is an alternative to Gravity Forms that will allow your Users to create or edit their CPTs. If you use Gravity Forms to create the posts, it's still possible to use CRED to edit those posts, so the two systems can be used together to some degree. Here's what you can do in Toolset:
- Use CRED to create a form that allows Users to edit their own CPT posts.
- Create a custom Page where your Users will be able to go to see a list of submitted CPT posts and links to edit those posts.
- Create a View that shows the correct filtered list of the User's CPT posts, and place that View on the custom Page you just created.
- Create a link to edit the CPT post with CRED, and insert that link in the View's Loop Output area along with the CPT title / link to that CPT.
- Create a link to delete the CPT post with CRED, and insert that link in the View's Loop Output area.
If you haven't reviewed the CRED documentation, I encourage you to check out the User Guides and training information here:
https://toolset.com/documentation/user-guides/creating-cred-forms/
https://toolset.com/documentation/user-guides/displaying-cred-editing-forms/
https://toolset.com/documentation/user-guides/cred-training-course/
Then if you have additional questions, feel free to open a ticket for any specific issue.
Wonderful information. Thank you very much. I'm leaving this open because I'm certain that I'll have a follow up question. Reviewing the answer links now.
Thanks!
Okay great. I will mark this ticket as pending an update from you. No need to reply right now, the ticket will stay open for 30 days.
Hello Christian,
So after looking through this, I'm about 90% satisfied with my skills to do things I need. One other part of the editing of these CPT submissions is the ability to hide certain information (both on the front end and the back end) based on the subscription level of the user who is creating/editing these CPTs.
What I mean is..
- The user has paid for a subscription level that allows him/her to add a post.
- However, the user has not paid for the ability to have an image gallery in their posts.
So the question is, is there a way to limit certain things they can add - as well as limit those items on the front end, so that (in this case) the user who has added a gallery to their post, but has had their subscription expire, can no longer see/edit their gallery, and the post will not show the gallery on the front end to visitors.
I hope this makes sense.
Thanks again!
On the front-end of the site, we offer two different kinds of conditionals that can be used to show and hide content.
- Inline Access Control tags: https://toolset.com/documentation/user-guides/access-control-texts-inside-page-content/
These give you the ability to show or hide content based on the role of the current logged-in user, but not based on the role of the author. I do not think this type of conditional will be helpful in this particular case.
- Conditional HTML: https://toolset.com/documentation/user-guides/conditional-html-output-in-views/
These conditionals give you the ability to apply arbitrary rules to show and hide site content. However, I think that it would require some custom code to access the role of a post's author, as there is no shortcode built-in to Toolset that will give you that information. Another ticket I found on the forum discusses such a custom shortcode: https://toolset.com/forums/topic/get-post-author-user-role/
On the back-end of the site, we offer the ability to manage content using role-based permissions. Access is set up to only allow one role per User. This means that for each combination of permissions, you must add a separate role. For example:
- CPTGalleryAuthor
- CPTAuthor
Then you can manage the permissions of each role using Access Control:
https://toolset.com/documentation/user-guides/managing-wordpress-admin-capabilities-access/