Skip Navigation

[Resolved] CRED and ACCESS to create and view user's own taxonomies

This support ticket is created 6 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Author
Posts
#921929

I'm creating a sort of inventory tool where an author level user can create in frontend (CRED) the categories (such as "First floor", "Second floor") and content (such as "Wooden Biedermeier table") and then view this content filtered with the categories she/he created.

I know how to create the custom posts and views that show only the user's own posts. But I don't know how the logged in user could create his/her own taxonomies and assign the posts to those taxonomies. Is this even possible? If not, perhaps I should use another custom post type (such as "Locations") with relation to the first one and perhaps CRED would be usable for this?

Please let me know your ideas/suggestions, thank you!

#921967

1. But I don't know how the logged in user could create his/her own taxonomies and assign the posts to those taxonomies. Is this even possible?

In the Front end with Toolset Forms, this is possible only if you have a Form applying to a Post type that uses the Taxonomy in Question.
Then, the form includes (if you AutoGenerate it, by default) the Taxonomy Selector and as well a small interface is included to add new terms to the taxonomy (but not new taxonomies themselves)

That is as far you can go with Forms, this means, you can add new terms to new posts or new terms when editing a post, but not create a new term as a standalone "act" of a Form, and as well not add Taxonomies with Forms

2. If you need the user to only tag your posts, then toolset Forms to edit or add the posts are fine, since those will include all mechanisms so to add or edit the terms attached to the post.

If you need the user to as well add new "taxonomies" and "only terms", then yes, you'd need to switch either to custom code, or use relationships instead.

With Custom Code, you could for example, create a Dummy Form that creates some Dummy Posts, and when a user submits it you just fire whatever custom action populated with Form Field values, so to add or remove terms/taxonomies.
This could be done hooking native WordPress actions to Toolset CRED Forms API:
https://codex.wordpress.org/Function_Reference/register_taxonomy
https://codex.wordpress.org/Function_Reference/wp_insert_term
https://toolset.com/documentation/programmer-reference/cred-api/

With Relationships you could use a Many To Many relationship between 2 post types, but there, the approach would be very different as you would create related posts and not tagged posts.

It can however be used for a similar purpose as tagging.

#921985

Thank you Beda! I forgot to add and emphasize the very important thing: the user should see and be able to edit only his/her own posts and tags. So I guess the reasonable way to go would be relations, right?

#922019

Yes, because you cannot control Taxonomies that way with Access, I missed that point in your Ticket's Title.

#922020

Yes, excatly - thanks again!