Support

Account

Home Forums General Issues Get value from custom field taxonomy Reply To: Get value from custom field taxonomy

  • To you have your taxonomy field set to return Term Objects or Term ID? include must be an array of Term IDs.

    You can override the field setting and get just the IDs

    
    <?php $zielgruppe = get_field( 'zielgruppe', false, false ); ?>
    

    Your field may also be returning only a single value and you need an array

    
    if ($zielgruppe) {
      if (!is_array($zielgruppe)) {
        $zielgruppe = array($zielgruppe);
      }
      ....