WordPress ACF fetch featured image for custom taxonomy


I have an archive page of Custom Post type “post_type=2dpoint-recommends” where I want to show taxonomies available for this post type & the custom taxonomy is “taxonomy=recom_type”

I fetching taxonomy details with this code:

$wcatTerms = get_terms(
    array('hide_empty' => 0,
                'number' => 0,
                'order' =>'asc',
                'parent' =>0)

foreach($wcatTerms as $wcatTerm){

  $termName = $wcatTerm->name;
  $termID = $wcatTerm->term_id;
  $termURL = get_term_link($termID, 'recom_type');

          echo $termName;

I have created a custom field for taxonomy=recom_type using Advanced Custom Fields plugin in which Filed Name is recom_image.

I can add featured image in the backend but unable to fethc it on front archive page and display it as Taxonomy thumbnail.

Please check on this link the archive page with custom Taxonomies but no featured images: https://xalient.in/2d/2dpoint-recommends/

I will be thankful to you for help

Pankaj Kumar 4 months 0 Answers 11 views 0

Leave an answer