• I cant figure out why the below is only showing one post from each category (even thou there is several posts written for each category)nor will the next/previous display on the category page.

    <?php if ( have_posts() ) : ?>
    		<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;  $i= 0;?>
    
    			<?php /* The loop */ ?>
    			<?php while ( have_posts() ) : the_post();  $id = get_the_ID();?>
    			<?php if ($i % 2 == 0) { echo '<div class="centered inner"><div class="whole-post">'; }
    				  else { echo '<div class="blue-content color-grey"><div class="centered inner"><div class="whole-post">'; } ?>
    				 <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    				 <div class="post-info">Posted <?php the_time('F jS, Y'); ?><?php /*  |  Author: <?php the_author();  */?></a></div>
    				 <div class="post-content"><?php the_content(); ?></div>
    			<?php if ($i % 2 == 0) { echo '</div></div>'; } else { echo '</div></div></div>'; } ?>
    			<?php $i++; ?>
    			<?php endwhile; ?>
    
    			<?php $current_page = get_query_var('paged'); ?>
    
    			<?php if (($i > 3 ) || $current_page != 0)  { ?>
    			<div class="centered inner">
    				<div class="older-entries"><?php next_posts_link('Older Entries'); ?><?php previous_posts_link('Newer Entries'); ?></div>
    			</div>
    			<?php } ?>
    
    		<?php else : ?>
    			<?php get_template_part( 'content', 'none' ); ?>
    		<?php endif; ?>

The topic ‘Show more posts on category page’ is closed to new replies.