W
W
Web Lizard2016-01-20 17:32:53
WordPress
Web Lizard, 2016-01-20 17:32:53

How to display category image in ACF?

There is a category heading made through additional fields. The question is how to get it out?
get_field('image')
does not work.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Vorotnev, 2016-01-20
@Lizard-108

1. get_field() does not display, but receives data. For output, there is the_field()
2. In the field settings, you need to specify the correct returned data (image url)
3. To get ACF data from a taxonomy (category) term, you need the 2nd parameter, which looks like this:
'category_' - taxonomy name
$category_id - ID term
All this is in the documentation , which exists in order to read it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question