Skip to content

Instantly share code, notes, and snippets.

@lonchbox
Created March 10, 2016 16:25
Show Gist options
  • Save lonchbox/fb152c46f4ed5c1a410f to your computer and use it in GitHub Desktop.
Save lonchbox/fb152c46f4ed5c1a410f to your computer and use it in GitHub Desktop.

Revisions

  1. lonchbox created this gist Mar 10, 2016.
    16 changes: 16 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    <?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>';
    }
    }