How to limit the number of posts on the search page in Blogger

How are you bloggers, this time TechAshik.com will provide a few tips on how to limit the number of posts that appear when searching for an article on the blog search page.
Set how many post show in search page in blogger
This trick is quite easy, the way it works is the same as in the tutorial Limiting the Number of Posts on the Label Page. Please follow the steps below.

How to limit the number of posts on the search page

1. Sign in to Blogger>> Theme>> Edit HTML
Find the search box markup of your blog (this will according to the template you have use)

For example, here I Find my Search Box code from my blog blog. Let's modify this:
<form action='/search' id='search-us' method='get'> <table> <tbody> <tr> <td class='search-boxy1'> <input id='search-boxy1' name='q' onblur='if(this.value==&apos;&apos;)this.value=this.defaultValue;' onfocus='if(this.value==this.defaultValue)this.value=&apos;&apos;;' type='text' value='Type here to search...'/> </td> <td class='search-button1'> <input id='search-button1' type='submit' value=''/> </td> </tr> </tbody> </table> </form>
2. Then you only need to add the code marked below just below the input tag of the search box or replace whole search box code.

<form action='/search' id='search-us' method='get'> <table> <tbody> <tr> <td class='search-boxy1'> <input id='search-boxy1' name='q' onblur='if(this.value==&apos;&apos;)this.value=this.defaultValue;' onfocus='if(this.value==this.defaultValue)this.value=&apos;&apos;;' type='text' value='Type here to search...'/> <input name='max-results' type='hidden' value='7'/> </td> <td class='search-button1'> <input id='search-button1' type='submit' value=''/> </td> </tr> </tbody> </table> </form>

Determine the number 7 from the number of posts you want to display.

3. Save the template and see the results.

Thus tips on how to limit the number of posts on the search page that TechAshik.com provide, hopefully useful. If you have any questions about it drop a comment below in the comments section.

Post a Comment

0 Comments