Show summary with “Continue Reading” link instead of full text post on main page for posts

The below is what I did in order to make my main WordPress page (index.php) to show summaries for posts instead of full text posts. I think it’s much friendlier because users don’t have to scroll down forever to see when they can just skim over summaries.

I found the solution in this post: https://wordpress.org/support/topic/read-more-link-at-end-of-excerpt-is-not-loading-inside-of-the-load-more/#post-10192186

pasted the code found in solution above into functions.php (just at the end of file) in my theme

And also changed index.php in my theme from

get_template_part( 'template-parts/content/content' );

to

get_template_part( 'template-parts/content/content', 'excerpt' );

Then I just replaced

<em>More</em>
with
<em>Continue reading</em>

in the solution code so that my users can see “Continue reading” link instead of “More” link.

Leave a Reply

avatar
  Subscribe  
Notify of