Category: Wordpress

Adding a summary post page in wordpress

I have had to look this up several times so I thought I would post it here in my blog for any other person looking to post blog summaries on a page in their blog. This can be quite handy if you want to post the last 5 post of a particular category on a single page. I manage a site that post webinar links and articles every week so this is very helpful.

Assuming you have created a specific page template and have given it a name you then need to have a category associated with the page. You do this by adding:

?php query_posts(‘category_name=recent_trades&showposts=20’); ?> ?

The category name is the name of the category slug you created in your post category name in wordpress.  The show post is the number of post you want to show on the page. If you just add this code to the page then each entire post will show. This is not what I wanted so I had to make another change.

I located the function:

<?php the_content(); ?>

and changed it to:

<?php the_excerpt(‘Read more…’);  ?>

This created a short excerpt for each post on the page.  Very helpful if you want to add several short summaries on a page.