Croco Black Friday 2024 banner element
Copy discount code:
bfcroco2024
Days
Hours
Minutes
Croco Black Friday 2024 banner element
Help Center
How to Sort the WordPress Search Results by Relevance

How to Sort the WordPress Search Results by Relevance

Read how to sort the search results by relevance using the JetSearch plugin.

Before you start, check the tutorial requirements:

  • Elementor (Free version) or Block editor (Gutenberg);

  • JetSearch plugin installed and activated.

Arranging the Search Results by Relevance in Elementor

Firstly, check the presence and relevance of the necessary keywords in the posts that you want to display.

keywords in the posts

The keyword density helps you to set the order of the posts. It is significant to save the logical algorithm for relevant results.

To show the result as the first one in the list, prove that it contains the necessary keywords in the:

  • title;
  • content;
  • excerpt.

To show the result as the next one in the list, add the keywords in the:

  • content;
  • excerpt.

The less relevant results should also contain the keywords. If you add the keywords to the content only, the excerpt or the title will reduce the importance of the result, and it will be shown below the more relevant ones.

Open the page where you added the search bar with the Elementor editor or simply search for the AJAX Search widget and drag and drop it to the needed section.

header in the elementor editor

Proceed to the Content tab. Unfold Search Query, scroll down to the Results Order By and choose the “Relevance” option in the drop-down list.

results order by relevance

You can filter search results using either descending or ascending order in the Results Order dropdown.

results order

Don’t forget to update the settings. Now you can sort the posts as you wish.

search results sorted by relevance

Changing the Results Order in Gutenberg

As JetSearch works not only with the Elementor page builder, you can apply a Search block using Gutenberg as well.

To change the search results order, open the page with the AJAX Search block in the default WordPress editor.

ajax search block

Proceed to the Block tab and unfold the Search Query section.

search query of the AJAX search block

The AJAX Search block for Gutenberg has the same settings as the AJAX Search widget for Elementor described above. 

Scroll down the section and find the Results Order By option. Select “Relevance” from the drop-down list.

results order by relevance in the ajax search

Below you will find Results Order, where you can filter search results using either descending or ascending order.

results order in gutenberg

After completing all customizations, click the “Update” button and preview your search results according to the chosen order.

Now you know how to manage the search results and customize the content shown there by using the JetSearch plugin.

Was this article helpful?
YesNo

Need help?

Ask Facebook community

Get answers from 22K Crocoblock Community experts from all over the world.

Start a live chat

Ask question to support agent and share its details via chat messages.