Get meza theme
////Archive template

Archive template

Archive template for posts or any custom post type.

In this example, we will create a new archive template base on both sidebars layout Here. And use it for all posts, archives like categories and tags.

1. Create new archive template

2. Add template content

We already built the template in both sidebars layout page, so we will add the page title block and copy the layout of the both sidebars pages. Then edit post element to Use the current query instead of latest posts.

3. Apply template for all post archives.

To apply this template for archives we will use Template conditions. With template conditions, we can use this template anywhere across the website.

Preview post archives

What’s next?

At this point our archives template is awesome for many reasons:

  • Easy to build.
  • Managed from one place.
  • Rich with dynamic content
  • Apply to single archive, multiple archives or all post type archives.

The only downside of the previous template is the post module, it’s using the default template. It’s good, but not fit with everyone’s needs. So we add our most unique feature The partial templates.

Next step:

Was this article useful?

Yes

No

Last update on: May 4, 2020

Share:

Related Articles

Single post template