Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

3 Answers 3

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

 
discard

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.