Support

Account

Home Forums Front-end Issues Display Field Group like a category page Reply To: Display Field Group like a category page

  • Not really enough information to really know what the problem is.

    This is a basic query and loop, hopefully it helps you out. You’ll notice that the loop looks just like “The Loop” used for showing pages/posts/anything in WP.

    
    $args = array(
      'post_type' => 'brochure',
      'posts_per_page' => 10
    );
    $brochure_query = new WP_Query($args);
    if ($brochure_query->have_posts()) {
      while ($brochure_query->have_posts()) {
        $brochure_query->the_post();
        ?>
          <h1><?php the_title(); ?></h1>
          <?php the_content(); ?>
          <div>
            <h2>A Custom Field</h2>
            <?php the_field('file_letter'); ?>
          </div>
        <?php 
      } // end while have posts
      wp_reset_postdata();
    } // end if have posts
    

    for more examples of querying posts and showing custom fields take a look at https://www.advancedcustomfields.com/resources/query-posts-custom-fields/