• Hi there,

    I have an issue with a category.php page.
    I have categories on my website with custom fields to customize their look (Header image, tiles…)
    It works but the values of the custom files only show if a page is set to this category.
    I mean if there is not post to show on this category, I can’t get the Category ACF values.

    In may category page, before the loop I have:

    $category = get_the_category();
    $image_category = get_field(‘image’, $category[0]->taxonomy.’_’.$category[0]->term_id);

    Is that normal?
    Is it possible to get those values if the category is empty?

    Cheers,

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Category.php with ACF’ is closed to new replies.