Here is the easiest way to customize WordPress excerpt, and display WordPress post excerpt on Homepage or the Category page not full post.
When you installed WordPress and keep publishing posts, you’ll find that WordPress displays full post on the Homepage or the Category page of your WordPress blog. In fact, it leads to a poor experience, and makes quite painful and difficult for any visitors to get your post point quickly.
As one of the most user-friendly CMSs, WordPress allows you to fix this by displaying WordPress post excerpt – an optional description or summary of your blog post article. The only thing is how to display WordPress post excerpt on the Homepage or the Category page not full post.
Maybe you’ll be suggested to use a WordPress plugin to deal with it. For me, install WordPress plugin is always the plan B. Like I mentioned in my last post, the number of plugins installed on your WordPress site will have an impact on the performance and loading speed of your site.
And actually, do a very little coding trick can perfectly make it. Here is how.
- Go to your WordPress Dashboard > Appearance > Editor
- Find “php”in the Theme Files
- Find get_template_part( ‘template-parts/post/content’, get_post_format() );
- Change get_post_format() into ‘excerpt’, like get_template_part( ‘template-parts/post/content’, ‘excerpt’);
- Click “Update Files”button to save the change
See, it works.