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?
Leave a Reply
You must be logged in to post a comment.
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?
You must be logged in to post a comment.
Look somewhere after the “Loop” starts (it starts with
<?php while( have_posts() ): the_post(); ?>
) in yourindex.php
file.Find
<?php the_content(); ?>
and change it to<?php the_excerpt(); ?>
. If you don’t want any content, just removethe_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.
lines of text? that would be
<?php the_excerpt() ?>
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.