Thanks for the response, I think on balance it’s easier for me to query the options table directly:
$terms = $wpdb->get_results( "SELECT CAST(TRIM(TRAILING '_offer_pages' FROM (TRIM(LEADING 'offer_category_' FROM option_name))) AS INT) AS term_id FROM ".$table_prefix."options WHERE option_name LIKE 'offer_category_%_offer_pages' AND option_value LIKE '%\"" . (int)$page_id . "\"%'");
Interested to hear feedback on this but this will give me the term id’s I need which I can then hook back in to the ACF and WordPress functions to pull out the related offers.
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!