How to display excerpts in the categories of the WordPress Twenty Sixteen theme

Excerpts for the Twenty Sixteen theme

How to display excerpts instead of full posts in the category pages (archives) of the WordPress Twenty Sixteen theme?

Find the archive.php file

  1. Open the WordPress dashboard, then go to Appearance -> Editor, select the archive.php file on the right.
  2. Click to open the archive.php file

Edit the file to show the excerpts

Excerpts for categories in the Twenty Sixteen theme

Find the following line inside archive.php

inside the loop replace the following line

with

Click on Update the file at the bottom of the page.

All done.

Excerpts will be shown instead of full post in the category (archive) pages.
The excerpts will be composed of the clickable title and of the first words of the posts.

The Explanation

the_excerpt() function shows the excerpt of the post, showing only the content, so adding a call to the_title() is needed. The replaced call showed all the post calling the related template.

Other solutions

A more clean solution to show the excerpts in a category which includes creating a child theme can be found in this german page.

Creating a child theme in WordPress can be useful because when the Twenty Sixteen theme will be updated you’ll lose your changes.