hello,
very nice plugin, I really loved this plugin and helped me more on our project..
im using this plugin for creating custom post for user/client who registerd on our website, our website using for sale used machine factories.. I’ve created the forum for create custom post and all working fine but I’ve problem in category and sub category my client need field using to choose the parent category only (without subcategory) and other field using to choose the child category only from the parent category that have been chose from the first field (parent category) in create custom post ..
for example:
parent category 1
sub 1
sub 2
parent category 2
sub 3
sub 4
if now we are in the create custom post page and have two select fields for categories:
first select field you can chose parent category 1 or parent category 2 .. and you have chose parent category 1
second field will display sub 1 and sub 2 from parent category 1 that you have been chose..
its possible to make it in create post page, I hope to found something like that
sorry for my english
best regards,
thank you
can any one help me please
I still waiting for any one answer me, I’ve to review website tomorrow.. help please
I don’t know of the OP found a solution. This question was asked a long time ago.
I would use select fields and not taxonomy fields. For the first field I would dynamically generate the values of the “parent” category form the information here https://www.advancedcustomfields.com/resources/dynamically-populate-a-select-fields-choices/
For the child category I would use ajax to populate the select field. I have created an example of doing this here https://github.com/Hube2/acf-dynamic-ajax-select-example/tree/master/dynamic-select-example. This example uses posts in a post type, but the principle is the same.
You would also need to create an acf/save_post filter https://www.advancedcustomfields.com/resources/acf-save_post/ if you want to update the post categories https://codex.wordpress.org/Function_Reference/wp_set_post_terms since you wouldn’t be using a taxonomy field that would do this automatically.