1

I think you can just fetch it from the global query using get_queried_object: function itunes_head() { if ( is_category() ) { $category = get_queried_object(); if ( isset( $category ) ) { $acf_category = 'category_' . $category->term_id; $field = get_field( 'my_category_field', $acf_category ); } } ...


Only top voted, non community-wiki answers of a minimum length are eligible