Back to contents

How to create an archive page template to display the custom post type archive

Here we will learn how to create an archive page template to display the custom post type archive with JetThemeCore plugin for Elementor.

Are you up to the task of creating an archive template?

An archive page allows displaying posts based on selected criteria. E.g., taxonomies, categories, custom post types, etc.

An archive template is a layout displaying the latest publications, it can be applied to the default posts as well as to the custom posts.

It might seem too complicated to create such a template, that would pull the posts dynamically, yet, within Crocoblock subscription you get JetThemeCore plugin, that is definitely the tool you need to create archive templates.

Creating an archive page template

Step 1 — In order to create an archive page template, open the WordPress Dashboard and proceed to the Crocoblock > My Library directory.

Step 2 — Switch to the Archive tab and click the Add New button.

Archive tav in Crocoblock library

Step 3 — Provide the template with a title and click the Create Template button, and Elementor editor will open automatically.

Archive template type

Note! You can use Listing Grid widget (provided within JetEngine), Posts widget (from JetElements) or Smart Posts List widget (available in JetBlog) to create an archive for the custom post type.

Regardless of the widget you’ve chosen, you will need to set to the needed custom post type in the Post type dropdown (depending on the widget, this option may be located in different parts of the Content settings).

Step 4 — Also, make sure you’ve turned on Use as Archive template option in the Content settings (however, the location of this option varies depending on the widget you are using).

Content settings in Archive template

Step 5 — You may also add the navigation to your archive template in case you are using either Posts widget or Smart Posts List widget.

Step 6 — To do so, find Posts Navigation widget and drop it to the page’s canvas.

Posts Navigation widget

Feel free to check how the navigation can be added in more details here.

Step 7 — After the customization is complete, apply the needed conditions for the archive. To do so click the cogwheel icon in the bottom left corner and open the Conditions block. Here you will see three conditions that you can choose:

  • The Entire site condition – the archive template will be applied to the entire site.
  • The Singular condition – for the specific posts, pages, categories, tags, etc.
  • The Archive conditions – the archive template will be used for different archive pages or search results archives.
Archive conditions

Step 8 — Finally, click the Publish button in order to save the progress.

Great! Now you can view the custom post type archive on front-end. To do it, type in the slug of the custom post type after your website’s address (e.g., “http://mysite/custom-post-slug”).

Hoping this tutorial helped! Feel free to create as many archive templates as you need to make the custom post types showcased the way you want.