I’ve currently set WordPress to only show the latest 5 posts in the blog page.
It works correctly and the post excerpts are being shown as desired.
Only problem is, the 6th post is not shown at all and pagination is not added.
I need a ‘Previous/Next’ system to show the other pages but couldn’t find how to implement it anywhere.
Current theme code:
<?php
if (is_page()) {
the_content();
}
if (is_front_page()) {
the_content();
}
if ((is_single())) {
echo '<h2 class="entry-title"><a href="'; echo the_permalink(); echo'" title="'; the_title(); echo '">'; the_title();
echo '</a>';
echo '</h2>';
echo '<h6>'; the_excerpt(); '</h6>';
}
if ((is_home())) {
echo '<h2 class="entry-title"><a href="'; echo the_permalink(); echo'" title="'; the_title(); echo '">'; the_title();
echo '</a>';
echo '</h2>';
echo '<h6>'; the_excerpt(); '</h6>';
echo '<h4>';
echo '<a href="'; echo the_permalink(); echo '">';
echo '<img src="'; bloginfo( 'template_directory' ); echo '/images/read_more.gif" alt="Read more..." border="0" />';
echo '</a>';
echo '</h4>';
echo '<hr />';
}
?>
<?php ?>
</div>
<div class="body-bottom"></div>
</div>
<?php endwhile; ?>
</div>
</div>
</div>
<?php get_footer(); ?>
This plugin is also useful for paging.
http://www.devdevote.com/cms/wordpress-plugins/wp-paging
you can also use wordpress default paging code: