Only one post showing in the loop when there should be more
-
I created a custom archive template and now am having trouble with the loop. Even though I have two posts, only one is displaying.
Here is my code for the loop:
<?php /* Start the Loop. */ ?> <?php while (have_posts()) : the_post(); ?> <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <?php if ( has_post_thumbnail()) : ?> <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" > <?php the_post_thumbnail(); ?> </a> <?php endif; ?> <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyten' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2> <div class="entry-utility"> <?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?> </div><!-- .entry-utility --> </div><!-- #post-## --> <?php endwhile; /*End the Loop */ ?>
Here is the archive page: http://www.southernresorts.com/southern-perks/
I don’t think this has anything to do with it, but the posts displaying are CPTs I made with the Custom Post Type UI plugin.
- The topic ‘Only one post showing in the loop when there should be more’ is closed to new replies.