I am trying to add a line or two of code to what I am using to call posts to my archive pages.
I've tried a lot of things, but because I'm using a piece of code that is a little irregular, everything I enter has not worked (it doesn't match up with the code in question in previous answers on here).
Here is the code I'm using. I just want to be able to set the number of posts per page(and, if possible, add a "next page" button).
<?php if( $posts ) : ?>
<?php foreach( $posts as $post ) : setup_postdata( $post ); ?>
<?php $column = ($column == '') ? 'first' : (($column == 'first') ? 'middle' : (($column == 'middle') ? 'last' : 'first' )); ?>
<div class="post <?php echo $column; ?>" id="post-<?php the_ID(); ?>" >
<div style="border-bottom:1px solid #DDD; border-radius:5px; padding:3px; margin-bottom:20px;">
<a href="<?php echo get_permalink($post->ID); ?>" >
<?php if ( has_post_thumbnail()) : the_post_thumbnail('columner-thumb'); endif; ?>
<h3><?php echo $post->post_title; ?></h3>
</a>
<p><?php the_excerpt(); ?> </p>
<h5><i>Published <?php the_time('F j, Y'); ?> in </i><?php the_category(' ');?></h5>
</div>
</div>
<?php endforeach; ?>
<?php endif; ?>