Support

Account

Home Forums Feedback Get fields in group Reply To: Get fields in group

  • my current solution is this:

    $argsc = array(
            'order'             => 'ASC',
            'hide_empty'        => true,
            'fields'            => 'all',
          );
          $termsc = get_terms("user-type", $argsc);
    
          foreach ( $termsc as $cterm ) {
            $value = get_field( 'company_id', $cterm);
            if($_GET['key'] == $value){
              $image = get_field("company_logo", $cterm);
              if ($image != '') {
                $image_src = $image['url'];
    
              }
              break;
            }
          }

    maybe there is an easy way to do it without looping over each term.