• Hi all,

    I’ve done this before but just want to see what the recommended method is as I’m sure the way I’ve done it in the past is not ideal.

    For instance, I have a site where I want to display about 4 or 5 different post types on the homepage. One columns might load CPT1, the second column will load CPT2 etc.

    Usually I would have multiple loops going on which I don’t think is the best way of doing this so if someone could point me in the right direction I’d appreciate it. Does anyone know a good tutorial?

    <?php
    $args = array( 'post_type' => 'POST TYPE');
    $loop = new WP_Query( $args );
    while ( $loop->have_posts() ) : $loop->the_post();
    
    the_content();
    
    endwhile;
  • The topic ‘Display various custom post types on homepage’ is closed to new replies.