I am using wordpress 4.1 with ACF v4. I have a custom post type with custom fields added and need add a new custom field each time a new category is added. If i add the category “Sedan” automaticly i have to add the custom field “Sedan” in the group. Can I do this with the plugin functions? Or I have to do this with code, with inserts in database? Thanks in advance!!
Rolling your own field would probably be your best bet. Take a look at Awesome ACF. They have a lot of cool new fields to get you started. For what you’re looking for the Taxonomy Selector would be a good starting point. It has a method (get_taxonomies) that pulls current taxonomies into the custom field settings for selection.
For that I would want to run everything through local JSON. Then tie into the WP create_category hook. Each time a new category is created, parse the json from the local file and update it. ACF will then pull the data from that json file instead of from the DB.
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users