Post excerpts on home page with Twentyten theme

twentyten

I’m a big fan of WordPress Twentyten theme. Because of it’s classiness. But by default It shows all full posts on home page, search page, category pages etc. Because of that users have to wait little longer till page loads. Other thing is you can not show many posts when they show full posts (It take long space). That is why it is always better if you can show only post excerpts in home page and other pages. Then you can show many posts too.

You can do this easily.

Go to Appearance —> Editor then find loop.php

Replace this code

<?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>

With this code.

<?php if ( is_archive() || is_search() || is_home() || is_front_page() ) : // Only display excerpts for archives and search. ?>

You are done. Now check your home page and other pages. Users don’t have to wait till all posts load on home page and other pages.

Note : If you are new to coding or if you are new to wordpress I strongly recommend you to backup loop.php before you edit it.

This entry was posted in How To. Bookmark the permalink.

2 Responses to Post excerpts on home page with Twentyten theme

  1. Liz says:

    I tried your code and it worked perfectly. However can you tell me how you got your images to show as well. Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>