My new WordPress theme works perfectly except I don’t know how to limit the blog posts shown in the blog page

Mar 13, 2012   //   by phpfreelancer.biz   //   Blog, Wordpress Theme Tutorial  //  No Comments

My theme supports pages, posts and blog category pages but my assigned blog page doesn’t limit anything, it shows all posts no matter what. I’ve already set the blog page to show only 5 latest posts.

I just want it to show an excerpt of the blog posts with a ‘Read more…’ link in the bottom.
How do I only show excerpts of posts in the blog page?

To show excerpts of posts:
Use the_excerpt() where you want an excerpt to show up rather than the_content(). So something like

<?php if (is_home()) {
    the_excerpt();
} else {
    the_content();
} ?>

Leave a comment

Share This Post

RSS Wordpress News