Support

Account

Home Forums ACF PRO Getting all available custom fields of a post type Reply To: Getting all available custom fields of a post type

  • i think i found it:

    $group_NAME = 'Attribute';
    $group_query = new WP_Query( array( 'post_type' => 'acf-field-group', 's' => $group_NAME) );
    $group_ID = $group_query->post->ID;
    $field_query = new WP_Query( array( 'post_type' => 'acf-field', 'post_parent' => $group_ID) );

    the second query returns me all available custom fields of the fieldgroup “Attribute”