Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

wp get field taxonomy

<?php $terms = get_field('tech_choices');
$cat_icon = get_field('creative_icon', $queried_object); ?>
<span>
	<?php if( $terms ): ?>
	<ul>
		<?php foreach( $terms as $term ): ?>
		<li><a href="<?php echo get_term_link( $term ); ?>"><?php echo $term->name; ?></a></li>
		<?php $icon = get_field('creative_icon', $term->taxonomy . '_' . $term->term_id); echo $icon; ?>
		<?php endforeach; ?>
	</ul>
	<?php endif; ?>
</span>
Source by support.advancedcustomfields.com #
 
PREVIOUS NEXT
Tagged: #wp #field #taxonomy
ADD COMMENT
Topic
Name
9+8 =