Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $taxonomy = 'range';
- $tax_terms = get_terms($taxonomy, array('hide_empty' => false));
- foreach ($tax_terms as $tax_term) {
- $image = get_field('illustration', $tax_term);
- $size = 'thumbnail';
- $thumb = $image['sizes'][ $size ];
- echo '<img src="' . $thumb . '">';
- echo wp_get_attachment_image( $image, $size );
- echo '<span>' . '<a href="' . esc_attr(get_term_link($tax_term, $taxonomy)) . '" title="' . sprintf( __( "View all posts in %s" ), $tax_term->name ) . '" ' . '>' . $tax_term->name.'</a></span>';
- }
- ?>
Add Comment
Please, Sign In to add comment