Support

Account

Home Forums Front-end Issues My category field doesn't show up in archive.php

Unread

My category field doesn't show up in archive.php

  • Hi to all, I’m new here.
    I’m usign this awesome plugin to add some extra field in my template, but I have a big problem:
    all my fields have a category taxonomy term relation and all of them are not visible in archive.php. Is there something I missed or what?

    I used this function in the function file:

    function multiple_cities() {
    $queried_object = get_queried_object();
    $taxonomy = $queried_object->taxonomy;
    $term_id = $queried_object->term_id;
    $ml_cities = get_field('city', $taxonomy . '_' . $term_id);
    return $ml_cities;}

    but in archive.php the var_dump of the whole function returns me “bool(false)”.

Viewing 1 post (of 1 total)

The topic ‘My category field doesn't show up in archive.php’ is closed to new replies.