Image with name in List Form
-
I’m trying to create a list of the Taxonomy Images with the name and print them in list form.
I am using the following code but I can’t get it to add the HTML elements for the list with class:
add_shortcode('taximage', 'taximage'); function taximage() { global $post; $terms = apply_filters( 'taxonomy-images-get-the-terms', '', array( 'taxonomy' => 'property-feature', 'after' => '</div>', 'after_image' => '</span>', 'before' => '<div class="my-custom-class-name">', 'before_image' => '<span>', 'image_size' => 'detail', ) ); foreach( (array) $terms as $term) { $out .= wp_get_attachment_image( $term->image_id, 'detail','' ); $out .= $term->name; }
[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
Any help would be appreciated.. Thanks!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Image with name in List Form’ is closed to new replies.