archive.php to show posts in the loop. You can use different templates for categories and authors by copying the template files to your child and rename them.
- Download templates
- Copy template files to (child-)theme’s root folder and rename them.
There are several ways to use these templates, take a look at the WordPress Template Hierarchy.
WordPress first searches for a
category-(category-slug).php. If that file doesn’t exist, it takes
category.php. And if that file doesn’t exist too, then it takes
For example, all posts should be displayed in equal-height style. Copy
archive-equal-heigt.php to (child-)theme’s root folder and rename it to
archive.php. If you want to use separate files for category and author, do the same with
For example, you are using the same template everywhere, but want to display one category differently from the others.
You have a category “cats” and want to use it in masonry style, while the category “dogs” uses the default layout. This case, just rename
For author the same. Simple rename the respective
author-*.php into author-name.php. For example, Author name “John Doe”,
rename archive-equal-height.php into
author-john-doe.php and his author page will shown different than the other authors.
There are 5 templates for each category, archive and author. These templates are the same for all of them, they only differ what is in the header.
- The category templates remove the usual “Category:” before the category name in the heading
- The author templates show the profile picture of Gravatar
- The archive templates show the usual archive with the heading “Month: March 2020”
HTML can be used in in the category description or the authors bio.
These are the default templates. The posts are displayed in horizontal cards which flip to vertical cards on smaller screens. If a sidebar is active, it will be shown on the right. If no sidebar is active, the posts are displayed across the entire width of the container.
The same as default, but the sidebar is on the left.
Shows the posts in vertical cards in a grid and the sidebar on the right. If no sidebar is active, there will be white space. All cards are the same height, no matter whether there is a featured image or not, long or short excerpt, long or short heading. The Read more is always at the bottom of the card. The height of all cards determines this one with the most content. So if the cards sometimes have very little and sometimes a lot of content, there is a lot of white space. This can look very tidy if all posts have approximately the same length of excerpts and all have a picture or none.
The same as *-equal-height-sidebar-right.php, but without sidebar. The cards are displayed in a 3 (desktop), 2 (tablet), 1 (mobile) grid.
This represents the posts in a Pinterest-style layout. Each card only has the height of how much content it contains. No sidebar is displayed.
*-masonry.php requires the bs Masonry plugin which is included in the bs-loop-templates-UnzipFirst.zip file. It replaces the
card-columns from Bootstrap 4, which are no longer included in Bootstrap 5.