help with custom hierachical list of taxonomies
-
Hello! I’ve this code for generating a hierachical list of taxonomies :
<?php $taxonomy = 'finiture'; // change this to your taxonomy $terms = wp_get_post_terms( $post->ID, $taxonomy, array( "fields" => "ids" ) ); if( $terms ) { echo '<ul>'; $terms = trim( implode( ',', (array) $terms ), ' ,' ); wp_list_categories( 'title_li=&taxonomy=' . $taxonomy . '&include=' . $terms ); echo '</ul>'; } ?>
But i need to insert after each
<li>
elements this code :
<img src="<?php echo z_taxonomy_image_url($cat->term_id); ?>"/>
To have this structure :
<ul>Name<ul> <li><a><img />Sub-name</a></li> <li><a><img />Sub-name</a></li> <li><a><img />Sub-name</a></li> </ul>
I think that i need to change wp_list_categories() with another function…. i’m trying with no results…. Someone can help me? Thank u!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘help with custom hierachical list of taxonomies’ is closed to new replies.