Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Display Custom Taxonomy image field with Pods.io
<?php
$terms = get_terms( 'TAXONOMY' );
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){
foreach ( $terms as $term ) {
echo '<div class="item">';
$icon = pods_field( 'TAXONOMY', $term->term_id, 'FIELD', true );
$icon_url = $icon['guid'];
$icon_thumb = pods_image_url ( $icon_url, 'thumbnail', 0, false ) ;
$term_link = get_term_link($term);
echo '<a href="'.$term_link.'">';
echo '<img src="'.$icon_thumb.'" alt="">';
echo '<h3>'.$term->name.'</h3>';
echo '</a>';
echo '</div>';
}
}
@regiside

This comment has been minimized.

Copy link

@regiside regiside commented Aug 7, 2020

Bro, This is so helpful! I don't know why it's so hard to find this kind of info on the pods documentation. Thanks for posting it here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.