Home › Forums › General Issues › Image field on term returning ID instead of Array › Reply To: Image field on term returning ID instead of Array
Ok found it… I was messing around with the query for categories (making it return my custom post type: course).
Had this in my functions:
function alter_category_query($query) {
if(is_category() && empty($query->query_vars['suppress_filters'])) {
$query->set('post_type', array('course'));
return $query;
}
}
add_filter('pre_get_posts', 'alter_category_query');
changed it to also include the acf-field post type:
$query->set('post_type', array('course', 'acf-field'));
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.