How are you blogger friends, this time Droidnur will give a few tips on how to limit the number of posts that appear when searching for an article on the blog search page?
This trick is quite easy, it works the same as in the Restricting the Number of Posts on the Label Page tutorial. Please follow these steps.
How to Limit the Number of Posts on the Search Page
First Open your blog in Blogger > ThenTemplates > Open the blog editor template > Search the search box markup (according to the template you are using)
<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=='')this.value=this.defaultValue;' onfocus='if(this.value==this.defaultValue)this.value='';' type='text' value='Cari artikel lainnya...'/>
</td>
<td class='search-button1'>
<input id='search-button1' type='submit' value=''/>
</td>
</tr>
</tbody>
</table>
</form>
Next, you just need to add the code marked below just below the input tag of the search box
<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=='')this.value=this.defaultValue;' onfocus='if(this.value==this.defaultValue)this.value='';' type='text' value='Cari artikel lainnya...'/>
<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>
Specify the number 7 of the value='7'number of posts you want to display.
At last, Save the template and see the result.
Those are the tips on how to limit the number of posts on the search page that Arlina Code can convey, hopefully, it will be useful and important.