I have the following to display my list of categories:
$categories = get_categories( $args );
foreach ( $categories as $category ) {
echo '<li><img src=""/><a href="' . get_category_link( $category->term_id ) . '" rel="bookmark">' . $category->name . '' . '' . $category->description . '</a></li>';
}
But I am using the "categories images" plugin to assign an image to each category (which is what the
img src="" />
is for within the code. Within the src="" I need to get the following IF statement:
<?php if (function_exists('z_taxonomy_image_url')) echo z_taxonomy_image_url(); ?>
or even just the:
z_taxonomy_image_url();
How can I make this work please?