Home Forums General Issues want to display Category Image in loop Reply To: want to display Category Image in loop

  • it show long dump code i just paste part

    $args = array('child_of' => 43);
    $categories = get_categories( $args );
    foreach($categories as $category)
    $image = get_field('cat_thumbnail_image', '47');
    echo '<pre>';
    echo "Image field value:";
    echo "Category value:";
    echo '</pre>';

    47 is my one of category id.

    result bellow

    Image field value:NULL Category value:object(WP_Term)#399 (17) { ["term_id"]=> int(47) ["name"]=> string(7) "Banners" ["slug"]=> string(14) "banner-designs" ["term_group"]=> int(0) ["term_taxonomy_id"]=> int(47) ["taxonomy"]=> string(8) "category" ["description"]=> string(124) "We design and print custom size banners for all industries including motorsports, transportation, special events & more." ["parent"]=>