← Blog Activar Protocolo

Gist : Display Custom Taxonomy Pods.io image

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters Show hidden characters <?php $terms = get_terms( 'TAXONOMY' ); if ( ! empty( $terms ) && !…


<?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>';
}
}

view raw

gistfile1.txt

hosted with ❤ by GitHub

, ,

Descubre más desde lonchobox

Suscríbete ahora para seguir leyendo y obtener acceso al archivo completo.

Seguir leyendo