• Everything was fine…working…

    then all of a sudden my loop code starts displaying only 1 post when I have 6 in a specific category:

    My code is basic:

    <?php while ( have_posts() ) : the_post(); ?>
    
    <?php /* How to display posts in the asides category */ ?>
    
    <?php if  ( in_category('homepage') ) : ?>
    
    <div id="post-<?php the_ID(); ?>" <?php post_class(); ?> style="float:left; text-align:center;">
    			<h2 class="entry-title" style="height:60px; width:250px; text-align:center; border-bottom:1px solid #b5b5b5;"><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="gallery-thumb">
    							<a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php if(has_post_thumbnail()) {the_post_thumbnail('home-post');
    } ?></a>
    						</div><!-- .gallery-thumb -->
    
    <div class="excerpt-area" style="height:75px; width:250px; text-align:center;"><?php the_excerpt(); ?></div>
    
    </div><!-- #post-## -->
    
    <?php endif; ?>
    
    <?php endwhile; ?>

    I switched out the category conditional name to see if it would work for other post and it did. It worked for every other category post, but the one specified above.

    This is a tricky issue. I’m only looking for someone to give me some possibilities and I should be able to solve it myself.

  • The topic ‘Loop Only Showing 1 Post For A Category With 6 Posts’ is closed to new replies.