Support

Account

Home Forums Backend Issues (wp-admin) How get field by taxonomy

Unread

How get field by taxonomy

  • Hi, i have a problem, i create any fields, but each field have a condition by taxonomy.
    But i need show this fields in response wp-json…

    I make this;

    function get_config_clients( $post ){
      
      $group = get_terms(
        array(
          'taxonomy' => 'cat_notice',
          'object_ids' => $post['id'],
        )
      );
    
      foreach ($group as $key => $value) {
        
        $id = $value->term_id;
    
        if($value->slug === 'arquivo-bdm-express'){
          
          $field = get_field('field_63b424484fa35',  $value->term_id);
    
          var_dump($field);
    
        }
    
      }
    
      //return $group;
    
    }

    But dont working

    group
    field

    How make show in rest_api because not show for my

    /wp-json/wp/v2/noticias/88/?acf_format=standard please help me

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.