Custom page with a list of custom taxonomies and their respective images
-
Hello everybody,
First of all, I must say this is a great plugin. I wonder how did anyone think of this before? Thanks, Michael Fields.
I am struggling with a custom page and I’d appreciate to receive any help. What I need is to show a list of links for all terms of a custom taxonomy with their respective images inside the link.
I already have a list of links, but with no images inside. The code is below:
<?php $args = array( 'taxonomy' => 'my_custom_cat', 'order' => 'DESC', 'hide_empty' => false, 'parent' => 0 ); $terms = get_terms('my_ustom_cat', $args); $count = count($terms); $i=0; if ($count > 0) { $cape_list = '<div class="my-custom-cat-list">'; foreach ($terms as $term) { $i++; $term_list .= '<a href="/term-base/' . $term->slug . '" title="' . 'See all posts of this category' . '">' . $term->name . '</a>'; if ($count != $i) $term_list .= ' <br> '; else $term_list .= '</div>'; } echo $term_list; } ?>
My idea is to show the taxonomy image inside of the link (instead of the $term->name).
Does anyone have an idea on how to achieve this?
Thanks in advance!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Custom page with a list of custom taxonomies and their respective images’ is closed to new replies.