I've been customizing the output of the plugin in the last few days for usage in a few different scenarios on a page we are building and it is really working great for all of them with one exception that I hope someone can help me with:
The images are used for a custom taxonomy that is used together with a custom post type to show recipes. The goal now is to have an overview page that simply lists the first level of taxonomy categories (e.g. Desserts, Fingerfood, etc.). However, I can only get it to show all taxonomies, so, for example, i Desserts has the child Cakes but I would like to only show Dessert on the overview page. With my current code both are shown and unfortunately, my PHP skills are almost nonexistent, so I cannot get it to filter the results like I would need them to :(
Here is the code I am using:
$terms = apply_filters( 'taxonomy-images-get-terms', '', array('taxonomy'=>'food') );
if ( ! empty( $terms ) ) {
foreach( (array) $terms as $term ) {
echo '<div class="product_category_item product"><div class="post-thumbnail"><a href="?food=' . $term->slug . '">' . wp_get_attachment_image( $term->image_id, 'thumbnail' , 'taxonomy-image' ) . '</a></div><h3 class="entry-title"><a href="?food=' . $term->slug . '">'.$term->name.'</a></h3></div>';
};
}