Home > light-hearted > WordPress question; how do you show only a few lines of a post on the front page?

WordPress question; how do you show only a few lines of a post on the front page?

November 21st, 2010 Leave a comment Go to comments

I have a wordpress blog, and when I post an article, the entire article shows up on the front page, no matter how long it is. I want only 3-4 lines to show, so that the reader has to click on it to see the whole article. I have tried to fill in the “excerpt” box, but I didn’t see any changes.

So please, anyone with WordPress experience, 10 points will be given to the right answer!

Thanks!

bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark bookmark

  1. Windowphobe
    November 21st, 2010 at 06:47 | #1

    (The following assumes you’re on a self-hosted WP blog; you can’t generally make template changes like this on wordpress.com.)

    In your Main Index Template (index.php), somewhere within The Loop, you’ll find

    < ?php the_content(); ?>

    Change this to read:

    < ?php the_excerpt(); ?>

    The default excerpt is 55 words. If you want to change this length, you have to add a filter to functions.php.

  2. Adrian Snell
    November 21st, 2010 at 07:16 | #2

    When you want to post article , click your HTML tab. from there you can insert “more” option on the line in your article. Just choose how long you want your post to show on the front page and insert the “more” option after the line.

    Your post will be broken by “read more” link then :)

    Good luck

  1. No trackbacks yet.

Powered by Yahoo! Answers