Show only preview of posts on the homepage?

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?

Related posts

Leave a Reply

3 comments

  1. 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.

  2. 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.