Skip Navigation

[Resolved] User editing capability CPT Categories

This support ticket is created 3 years, 3 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
- 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 3 replies, has 2 voices.

Last updated by Luo Yang 3 years, 3 months ago.

Assisted by: Luo Yang.

Author
Posts
#2149327

Have a website for local town municipality. Would like to restrict adding of new content to a CPT setup based on the category it is attached to as their are different departments that load documents on the site, but they should not be allowed to load information and link the post to another departments categories. They should only be able to load content in the categories they are assigned to post within.

How can this be done? Do I have to setup a form for each department from where they are able to post and only select specific categories?

#2149401

Hello,

There isn't such kind of built-in feature within Toolset plugins, you might consider to setup different post forms for each department.

For example, in the those post forms, display a hidden generic field, setup different value for each form:
https://toolset.com/documentation/programmer-reference/forms/cred-shortcodes/#cred_generic_field
After user submit the post form, use action hook cred_save_data to trigger a PHP function:
https://toolset.com/documentation/programmer-reference/cred-api/#cred_save_data
In this PHP function, save the data into database:
https://developer.wordpress.org/reference/functions/wp_set_object_terms/

#2149503

Is there a tutorial on using cred forms to create posts for CPT?

#2149505

Please check our document:
https://toolset.com/course-lesson/front-end-forms-for-adding-content/
Front-end Forms for Adding Content in WordPress