I set up a new CPT and created a category and some child categories for it. However when I build a Cred form and add category select it shows the full list of categories for all post types. Is there any way to limit this to the categories assigned to the specific custom post type only.
thanks
If I understand you correctly, you have a hierarchical taxonomy with some terms in it. You have assigned terms from that taxonomy to multiple posts in multiple post types. In the Form field where a post's taxonomy terms are selected, you want to only show the terms that have been assigned to posts in the same post type being added or edited in the Form. Is that correct? If so, then I'm afraid that's not possible in the current system. It might be possible with some custom code, or you could consider changing this one hierarchical taxonomy into multiple hierarchical taxonomies. Let me know if I've misunderstood what you're trying to accomplish.
Hi Christian,
thanks for replying. Let me make it a bit clearer. I set up a CPT called Member Meals and added a category Meal type, with the following variants - breakfast, lunch, dinner, supper, snack. As I set these up under Categories they now show along with all the other Category types set up for Posts and Pages under Categories.
When I add a cred form input to select Meal Type I only want to see the above breakfast to snack options, but what I get is all the other categories in the checklist set also, from the other post types. I'd hope that I can set only the Meal Type related categories and not have this long list of all categories showing up in the form.
thanks.
Okay thanks, I understand a bit more. It's not possible to filter the standard category term list in a Form, but there are other approaches. It seems like a custom taxonomy would be the best approach here. Instead of adding "Meal Type" as a term in the standard Category taxonomy, create a new custom taxonomy called "Meal Types", then add your terms to this taxonomy. You can specify which post types should utilize this custom taxonomy, so the taxonomy meta box will only appear in post editor screens for those specific post types. You can also add the taxonomy as an input in your Form, where these terms will remain separated from the standard Category terms.
I had done as you suggest - i.e. set this up as a custom taxonomy, to solve the issue and get only the meal types I wanted for the select option on the cred form. It would still be very useful if standard categories could be filtered though. Thanks for your help.