Generally speaking, Wordpress doesn’t like to create two post pages. It takes getting the platform out of its comfort zone to force it to make it do something it doesn’t like.
Technically, my own site has two post pages. It displays the first few characters of a post (first one thousand characters, to be exact) and displays them on the home page, and then takes the rest of my posts (all content included) and displays it on my Blog page. However, to be really savvy, it just takes a little bit of PHP plus maybe a plugin, and your web site’s guests will never know the difference!
I worked out this method while working on the Howard Garrison site. The client had already paid for a premium theme, but needed someone to make a few edits to the template. The catch with this, however, was creating two blog pages.
I didn’t want to edit the premium theme too much; after all, it wasn’t my code, and it wasn’t necessarily documented very well either. Thus, the front page was set as the Posts page (which is the default in WordPress), and a custom template was made for the News page.
This is where things get interesting. I essentially copied the Loop off of the Index page, and put it on the News page (with some styling changes). So, essentially, your code looks something like this:
<!-- Start the Loop. -->
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php if ( in_category('3') ) { ?>
<div>
<?php } else { ?>
<div>
<?php } ?>
<!-- Display the Title as a link to the Post's permalink. -->
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<!-- Display the Time. -->
<small><?php the_time('F jS, Y'); ?></small>
<!-- Display the Post's Content in a div box. -->
<div>
<?php the_content(); ?>
</div>
<!-- Display a comma separated list of the Post's Categories. -->
<p>Posted in <?php the_category(', '); ?></p>
</div> <!-- closes the first div box -->
<!-- Stop The Loop (but note the "else:" - see next line). -->
<?php endwhile; else: ?>
<!-- The very first "if" tested to see if there were any Posts to -->
<!-- display. This "else" part tells what do if there weren't any. -->
<p>Sorry, no posts matched your criteria.</p>
<!-- REALLY stop The Loop. -->
<?php endif; ?>
(taken from this official Wordpress page.)
Now, if you look at that template file live, you’ll notice one thing: no posts appear. What’s with this? Isn’t the Loop supposed to retrieve the posts?
Not necessarily – at least, not if that page isn’t set to the posts page in the admin backend. Well, why not set it? Then the Home page we want as the main Blogs page will not show posts, leaving us where we started (duh). So, instead, at the beginning of our loop, we add this line of code:
<?php query_posts(); ?>
This line of code queries the actual posts; it can be set to query the posts of a certain category:
<?php query_posts('category_name=Design'); ?>
Query a certain number of posts:
<?php query_posts('showposts=100'); ?>
(note that we do not have the luxury of editing the amount of posts displayed in the admin backend, as we would on our normal blog page; we would need to edit the amount of posts by hand).
Or, query both:
<?php query_posts('category_name=Design&showposts=100'); ?>
Now you should be able to see however many of your posts on your custom template page, or the posts of a certain category, et cetera. Nifty, isn’t it?
Also, don’t forget to add in your navigation links at the bottom. You can either use this snippet of code:
<div>
<div><?php next_posts_link('« Older Entries') ?></div>
<div><?php previous_posts_link('Newer Entries »') ?></div>
</div>
Or, for this specific site, I chose to use this Wordpress page numbers plugin for the bottom links of the page.



