Support

Account

Home Forums Front-end Issues Custom Taxonomy in ACF Reply To: Custom Taxonomy in ACF

  • Hi Jonathan!

    I switched the return value to Term Object as your reco but the code did not work. Anyways, I fixed it already and here’s my working code:

    <?php 
    						/* sub specialty */
    						if (get_field('sub_specialty') != '') { ?>
    						<strong>Sub specialty.:</strong>
    						<?php
    $terms = get_field('sub_specialty');
    array($terms);
    foreach ($terms as $term){
    $subspec[] = '<a href="'.$term->slug.'" name="'.$term->slug.'" alt="'.$term->anem.'">'. $term->name .'</a>';
    }
    echo implode(' / ', $subspec);
    ; ?>
    						<br />
    						<?php } else { ?>
    						
    						<?php } ?>

    I added some codes too according to how I want it to be displayed.

    Thanks for replying btw. =]

    God bless!! ;]