Skip Navigation

[Resolved] adding a new sub-category to the list

This support ticket is created 5 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
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)

Author
Posts
#1178534

Tell us what you are trying to do? I have set-up conditional category and sub-category dropdowns with Christian's help. I want to add an option to "add a new sub-category", similar to the multi-select option. If there is not a suitable category in the list. Is there a shortcode for that?

Is there any documentation that you are following? Prior ticket: https://toolset.com/forums/topic/display-the-result-from-a-conditional-dropdown-selection-on-the-front-end/

Is there a similar example that we can see?

What is the link to your site? hidden link

#1178614

Hi, the only built-in option for adding terms directly in the Form requires the standard taxonomy input field. Since you've created this custom select system, the built-in field won't be useful. It might be possible to add generic text input fields to capture new terms, but it would require a significant amount of custom code. Similar to how you have used conditional groups to show and hide subcategory select fields, you could use conditional groups to show and hide generic text fields based on the options selected in the subcategory select fields. Then in PHP you could capture the terms submitted in those generic text fields and add them to the post using wp_set_object_terms.

#1178616

I am going to suggest the admin adds any additional categories if needed. At this point it would be a phase 2 request.
Thank you for your quick response.
Laurie

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.