WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to only have a couple lines shown per post (or even 0 lines) on the homepage? Instead of dumping the whole article on the page?

share|improve this question
up vote 3 down vote accepted

Look somewhere after the "Loop" starts (it starts with <?php while( have_posts() ): the_post(); ?>) in your index.php file.

Find <?php the_content(); ?> and change it to <?php the_excerpt(); ?>. If you don't want any content, just remove the_content() all together.

If you're using a theme from wordpress.org, it would best to do this in a child theme, so you can keep the original theme up to date.

share|improve this answer

lines of text? that would be <?php the_excerpt() ?>

share|improve this answer

If you don't know about it then my suggestion is to not use theme editor from wordpress because one single syntax error may harm your site

so login to your hosting panel

public_html -> your wordpress folder -> wp_content -> themes -> your theme name -> child theme name (if any) -> index.php

Now open it in your text editor and find the_content(); and replace it with the_excerpt();

and then go to your site and press cntrl + f5 if its not changed yet and you're done.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.