Support

Account

Home Forums Feedback Get fields in group

Helping

Get fields in group

    • ssurfer

    • January 30, 2020 at 7:09 pm

    Hi,

    i pass the company key as a parameter in an url.
    Then i search for this key in my fields (see attached screenshot), which do work.

    But how can i get all other fields in this group belonging to this taxonmy entry?

    I’m thankfull for every hint.

    Group

    • ssurfer

    • January 31, 2020 at 12:43 am

    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.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.