Quantcast
Channel: ACF custom fields not displaying on custom taxonomy template - Stack Overflow
Viewing all articles
Browse latest Browse all 3

ACF custom fields not displaying on custom taxonomy template

$
0
0

I have created a custom taxonomy called inn-features, I have then created a template page, whenever I try to show my custom fields the value always returns as null. Please can someone tell me where I am going wrong.

This is a really simplified version of the code as I stripped everything out to see where I am going wrong but I can't figure it out.

The var dump for each displays the following

<?php/** * The template for displaying taxonomy archive pages * */// get the current taxonomy term$queried_object = get_queried_object(); $taxonomy = $queried_object->taxonomy;$term_id = $queried_object->term_id;  // vars$test = get_field('test_text', $taxonomy);    var_dump($queried_object);    var_dump($taxonomy);    var_dump($term_id);    var_dump($test);    ?>

$queried_object, $taxonomy & $term_id all return values it is purely $test that returns null.


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images