Displaying custom taxonomy image on archive page
-
Can anyone assist with this please? I’m a little over my pay grade here.
Using the plugin and trying to add the image for a custom taxonomy to be called into this page: https://goo.gl/M3XCLK with this code:
$terms = get_terms('triptypes'); foreach ($terms as $term) { $term_link = get_term_link( $term, 'triptypes' ); if( is_wp_error( $term_link ) ) continue; $triptype_featured_images = wp_get_attachment_image_src( get_post_thumbnail_id( ), 'triptypes-big-featured' ); echo '<article class="' . implode( ' ', get_post_class() ) . '" itemtype="https://schema.org/ItemList" itemscope="itemscope">'; echo '<h2 class="entry-title"><a href="'. $term_link .'" title="'. $term->name .'">'. $term->name .'</a></h2>'; echo '<a href="'. $term_link .'" title="'. $term->name .'" class="location-hover">'; the_excerpt(); echo '</a>'; echo '<img class="aligncenter" src="'. $triptype_featured_images[0] .'" alt="'. get_the_title() .'"></a>'; echo '</article>'; }
I’ve been at this for few hours now, but need to call in some backup. I guess I’m looking at something around “$triptype_featured_images”, but the solution is proving elusive.
Any help much appreciated!
- The topic ‘Displaying custom taxonomy image on archive page’ is closed to new replies.