Support

Account

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'));