Back to contents

How to create an archive template to display the search results

Today we are going to show you the process of creating the archive template to display the search results with the help of JetThemeCore plugin.

What is a search result page? The answer is pretty simple – it’s an archive with all your content in it, like a catalog in the library. By using search functionality your visitors expect to see the most relevant results. An archive is used by both AJAX Search provided by the JetSearch plugin and the usual search from JetBlocks. So let’s get started and create the archive template with the help of JetThemeCore plugin.

Creating an archive template

Step 1 — Open the Crocoblock > My Library screen in your WP Dashboard to have a look at the theme parts templates.

add-a-new-archive

Step 2 — Switch to the Archive tab and click the Add New button at the top to create an archive template. After you have given it a name, proceed working with Elementor editor.

Step 3 — To display the publications you have, use one of the widgets below:

Depending on the widget you choose, your posts will be displayed with different layouts. Drag and drop it on the page and don’t forget to style it up according to your taste and needs.

Step 4 — Select the required listing in the Listing drop-down list. Make sure you have turned on the Use as Archive Template option by toggling it to Yes to make this widget inherit the archive settings.

use an archive template listing grid

Step 5 — Click the gear icon in the bottom-left corner of the page to open Archive Settings and move on to the Conditions accordion block.

Step 6 — In the General drop-down list, select the Archive option to define the template as an archive one.

achive-settings

Step 7 — Open the Archive drop-down list and select the Search Results option to specify the type of an archive tab. Click the Publish button.

Great! That’s enough to create an archive template if you want to display the custom archive when the search results are shown. Now go to your website, type in a keyword in the search field and see how everything works!

achive-settings

In order to find out more information about other conditions, feel free to walk through this guide.