Support

Account

Home Forums Front-end Issues Show an entire specific field group in frontend Reply To: Show an entire specific field group in frontend

  • Olá, eu fiz desta maneira.. Não sei se é a melhor, mas funcionou pra mim.

    Com while

    <?php
    $args = array('post_type' => 'acf-field', 'post_parent' => 9);
    $posts_total = new WP_Query( $args ); 
    
    while ( $posts_total->have_posts() ) {
    $posts_total->the_post();
    $values = $posts_total->post;
    
    echo '<pre>';
    echo $values->post_title . '<br>';
    echo $values->post_excerpt . '<br>';
    echo $values->post_name . '<br>';
    echo '</pre>';
    
    } wp_reset_postdata();
    ?>