I have a custom post type of products which has a taxonomy of product categories.
I have added an ACF image field to this.
I want to be able to output a title, description and image for each category on archive-products.php (which is my template for /products/)
I have been using a get_categories query as below for the standard output, I have tried to include the_field for the image but I cannot get it to display, how can I do it? I’ve read the documentation but can’t get it going.
Well, to get ACF values associated with a particular term, you have to pass an extra argument to the_field(...) or get_field(...) method to target the term ID. This argument can either be a term object or a term string as explained in the docs. The following code should work for you: