WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Urgent! Only ten CPT are displaying when I need ALL! (3 posts)

  1. deziiner
    Member
    Posted 3 years ago #

    Hey guys, I hope someone can help with this because I'm trying to relaunch the website soon.

    If you look at this page you can see that I have used Custom Post Types to create band profiles, and there's an 'archive' sort of page to overview them here: http://new.doubledance.ca/bands/profile/

    On that page it only shows TEN posts (profiles), when there's actually 12 in the database. The code I am using to call the archive/overview page is the following:

    <div class="post-content profiles" id="profiles-bands" style="width:990px;">
    <!-- Profiles: Bands -->
    <?php $loop = new WP_Query( array( 'post_type' => 'doubledance_bands' ) ); while ( $loop->have_posts() ) : $loop->the_post(); ?>
    ">
    <?php get_the_image( array( 'size' => 'large', 'width' => '320', 'height' => '213', 'image_scan' => true, 'link_to_post' => false ) ); ?>
    <span><?php the_title(); ?></span>

    <?php endwhile; ?>

    Is there something wrong in my code that would make the page only output 10 of the 12 posts? Can someone help with this so I can display them ALL?

    Cheers

  2. Kapil Chugh
    Member
    Posted 3 years ago #

    Try this one

    $loop = new WP_Query( array( 'post_type' => 'doubledance_bands', 'posts_per_page' => -1 ) );

  3. deziiner
    Member
    Posted 3 years ago #

    That worked terrific! Thanks so much for the help :)

Topic Closed

This topic has been closed to new replies.

About this Topic