pobranie linku kategorii poprzez custom fields

panel WP:

Custom fields – wstawione Pola:

link_news – jako Taksonomy

wybieramy ustawienia:

  • Field Type na radio buttons
  • Return Value na Term Object

kod na stronie do wyświetlenia:

<?php $term = get_field('link_news', 12); ?>
<a href="<?php echo get_term_link( $term ); ?>">more</a>