Assalamualaikum, this time Droidnur123 will share tips on how to install an Ajax search feature to a blog that I found on Arlina Code blog.
Best Feature of Ajax Search?
This Ajax feature has many advantages when compared to ordinary search options, one of which is being able to load a list of articles automatically without the need to press the search or enter button according to the keywords we are looking for. Pretty interesting isn't it?
For those who are interested, let's look at the following tips below.
How to Add Ajax Search Feature on Blog?
As I explained earlier, the way the Ajax Search feature works is that it automatically generates a number of articles according to the keywords we write in the search field. For example like the image below:
For Example when you write a health keyword in the search field, what comes out is a list of articles related to that keyword. So, do you understand? Okay.
( 1 ) First open Blogger > Click the Theme menu and click Edit HTML . Next, you just need to add the link below before </body>or <!--</body>--></body> and it will perfectly work on the search field on your blog
And I've also modified it a bit by adding CSS to make it look more attractive as posiable. download and Add the code below before </head>or</head><!--<head/>-->
Now Click the Save theme and You are done.
Note: "Here are some parameter options from the Ajax Search Feature that you can use according to your Blog."
Type | Information |
---|---|
live | If this option is false, then the article will not appear automatically until you press the search icon or enter button. |
URL | Replace the value with the address of your blog or the address of another blog that you want to display to ajax search. |
image | Change the value to true to display the article image. |
target | If the value is "_blank" , all links will open in a new tab. |
For more options, my friend can visit the Arlina blog :] in this article
An example of the parameter options I added such as: live=trueandimage=true
<script src='https://cdn.jsdelivr.net/gh/Arlina-Design/quasar@master/ajaxsearch.js?live=true&image=true'/>
If you want to add other parameters such as URL, you only need to add &as a delimiter between parameters. Examples like this below:
<script src='https://cdn.jsdelivr.net/gh/Arlina-Design/quasar@master/ajaxsearch.js?live=true&image=true&url=https://www.nama_blog.com'/>
We recommend that you re-host the code at this link https://cdn.jsdelivr.net/gh/Arlina-Design/quasar@master/ajaxsearch.js and look for this blog ID 5382492177374539930 then replace it with your blog ID.
Okay, that's all from me about "How to install Ajax Search Features on Blogs". Hopefully useful visit Again