Support

Account

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

  • now i am facing one small issue. bellow is my code. it is working fine. i get proper value but issue i want only active category value. bellow code show all category image loop

    <?php
    $args = array('child_of' => 67);
    $categories = get_categories( $args );
    foreach($categories as $category)
     { 
    	$image = get_field('cat_thumbnail_image', $category->taxonomy . '_' . $category->term_id );
    	
    	echo '<div class="test">'.$image.'</div>';
    }
    ?>