Step by Step Instructions for How to Set "Sort by Date" as Default Sorting Order for Blogspot/blogger Search Results Not "Sort by Relevance".

Search Results "Sort By Date" Order in Blogspot

Updated on: July 20, 2016
How to set Sort by date as default sorting order in blogger
How to set default order for search result

We have already discussed that Search is the necessary part of the blog/blogspot and whenever your users make search over it the resultant page shows results sorted by relevance for the give query for example:

Showing posts sorted by relevance for query sample. Sort by date Show all posts

Many of you want to change the order and would like to set "Sort By Date" as the default sorting order not "Sort by Relevance" so that your viewers can see your latest posts first without clicking on link each time to change the order. This method works only with 3rd party search boxes. Follow the given steps carefully.

How To Set "Sort By Date" As Default Sorting Order

Step 1. Login to your Blogger account, then navigate to your 3rd party Search Box code.

For example:

<form action="/search" method="get">
<input type="text" name="q" placeholder="Type Here..."/>
<input type="hidden" name="max-results" value="8"/>
<input type="submit" value="Search" />
</form>

Note: The above code may vary.

Step 2. Find the code </form> and paste the following code just above it.

<input name="by-date" type="hidden" value="true"/>

For Example:

<form action="/search" method="get">
<input type="text" name="q" placeholder="Type Here..."/>
<input type="hidden" name="max-results" value="8"/>
<input type="submit" value="Search" />
<input name="by-date" type="hidden" value="true"/>
</form>

Step 3. Save your code.

Read: How to Change Status message on search result page

Enjoy!

Jump into your blog and make a search. Wait! What? your search result is sorted by date not by relevance. Remember code may vary according to your search box, if the above tutorial doesn't work for you don't worry - comment below. Stay Updated, Browse Howbloggerz ! :)

Love it? Don't forget to Subscribe
  • The Elite Group
    The Elite Group
    4 March 2019 at 16:16
    Login to your Blogger account, then navigate to your 3rd party Search Box code. after login where to go and paste this code 2nd step is not clear please explain.
    Saurabh Jarial
    Saurabh Jarial
    4 May 2019 at 12:10
    In 2nd step, You have to edit your search box code which depends on the method used to add search box in your blog.
  • Badrose
    Badrose
    28 September 2019 at 10:24
    Thanks! Needed this
    Saurabh Jarial
    Saurabh Jarial
    3 October 2019 at 17:57
    Thank you :)
    Have a good day!