Home › Forums › General Issues › Adding fields in taxonomies via php › Reply To: Adding fields in taxonomies via php
You need to alter the location rules of the field group, this part
'location' => array (
array (
array (
'param' => 'post_type',
'operator' => '==',
'value' => 'post',
'order_no' => 0,
'group_no' => 0,
),
),
),
The best advice I can give you is to set up a field group in the admin, set the location rules correctly and then export that field group to get an example of what the location rules need to be set to.
Additional problems, all groups must have a group key that starts with “group_” and I didn’t look at every one of your fields but field must have a field key that starts with “field_”.
Group “ID” is irrelevant when registering field groups through PHP.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.