use get_queried_object to grab the value of the taxonomy (here in the location taxonomy).
0 1 2 3 4 5 6 7 8 9 10 11 12 | function country_content_addition() { $queried_object = get_queried_object(); $country_input = get_field('camp', $queried_object); $camp_input = get_field('camp_description', $queried_object); do whatever ..... } function add_tab_content(){ if(is_tax('location')) add_action('themeblvd_content_top', 'country_content_addition'); } add_action('template_redirect', 'add_tab_content'); |