Home › Forums › Backend Issues (wp-admin) › Custom Location Rule for Custom Taxonomy › Reply To: Custom Location Rule for Custom Taxonomy
Hi @brettzie
I believe you were trying to get the category from a taxonomy custom field type. I’m afraid this is not possible because when you select the terms in the field input, the data is not saved yet. So, when you were trying to get the value using the get_post_meta()
function, you will get the old value instead.
Kindly use the taxonomy meta box instead to do it.
If you want, you can also check the $options
value by using the var_dump()
function like this:
function acf_location_rules_match_product_category($match, $rule, $options){
var_dump($options);
I hope this helps 🙂
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.