we can see we have a new option called Ajax searchlight so let’s click on that and here you can see the options that we have for the Ajax search box.
First of all we can see that here we have some short code. So if you want to add this live search box into any of your post or your pages you can just copy this short call from here and add that short code to your post or your pages and the live search box will be available on your post or your page but here we will update the current search box with the live search box.
So for that we have this button over here called try to replace the theme search with Ajax searchlight form.
This also mentioned that it works with most of the Themes but it’s not guaranteed to work with all the Themes.
So let’s click on this button and let’s see whether the search works so let’s click on save options and let’s go over here and refresh our page and here you can see our live search box is being displayed and sometimes if the search works is not being displayed then you can go over here to appearance and then click on widgets and then here we have this widget available called Ajax searchlight.
You can just drag and drop this into your sidebar and just add the title and the Ajax searchlight will be available on your sidebar and you can just delete the current search box from here alright our search box is already working so I’ll just leave it here and let’s go back to the options first of all let’s go ahead and check how it works so let’s add some characters over here so I’ll type S and we can see all the posts with S are displayed over here you can even scroll down and you can click on any of these posts and that post will be opened let’s type S T and it updates live so this is how life search works now let’s go and take a look at the options that we have to customize first of all we have the option of adding the post types but for the Post types added are post and pages you can add all of these posts over here you can just drag and drop them over here or you can just click on this buttons and then if you scroll down we can see we have a lot of options like search in the title search in the content search in the post excerpts so whatever turn we have over here will be searched in these three places but if you want to search in the permal links or any other places you can turn these options on as well and then here we have the option of adding custom Fields so in WordPress you have the option of creating custom fails like title content and all this Fields you can create custom Fields so you can even add custom Fields over here so just drag and drop them over here and then we have the post statuses and then the option of searching password protected posts and then searching in terms so
so categories and tags and then let’s go ahead and take a look at the behavior and here we have the option of showing the exact matches only so it will be a little strict in searching so if you turn this on we can set with the match Fields are in the search phrase so you can set it to start with the phrase or ending with the phrase or complete match I just turn this off and then we have keyword logic so what we’re search terms we have it will search for all the posts which have whatever keywords that we type over here if we select all then even if there is one keyword that is matching in the post then it’ll be shown as well so just set it to and and then you have the option trigger search on face a change this I will show you later because it depends on a different options that we have to select and Trigger search when typing so this is the option where the search is being displayed when we are typing and we can even set the minimum characters that the search should start with so right now if I click on this we can see that the search Starts by default with zero characters if you set it to say two characters and save it and let’s finish our page and now if we click on this the search is not been displayed if I type some character additionally not being displayed and if I type one more character there are two characters so now the search is doing displayed so this is how it works and then the next option is the maximum results that we can have and then we have the actions for the magnifier icon so when we click on this icon what should happen we can set the options over here and even for the return key we can set what should happen and then we have the option of overriding the default WordPress search results so let’s go ahead and take a look at the next option which is ordering and here we can order how the search results are being displayed so we can order by relevance and title descending or ascending and date as sending or descending and the next is the autocomplete and suggestions so here we have the option of autocomplete so if I just type sa we can see that the
some autocomplete displayed over here you Factor app SDA we can see that some autocompletter word is being displayed over here so this is how the autocomplete Works and now let’s go ahead and take a look at the other option which is image options so in that you have the option of showing the images in the search results so if I turn this off then the thumbnails won’t be shown in the search and the image with then height and then the image source settings so you can go ahead and change this options and take a look at how it works and then we have the front end options so here we have the option of adding some more options to our search box so let me just turn this on and by default we have these options that the user can select so let’s go ahead and click on save now if I refresh this page we see that we have one more option over here so if I type something here we have this option of selecting the exact matches only or searching titles searching content here the visitor has the option of filtering and customizing the search results so this is one of the options that you can have in this Live Search so this is what we are referring to when we saw this behavior option over here trigger change on facet change so whenever you go ahead and make any changes in this options then it will trigger a search so this is the option that we had seen earlier alright so here we have some more options for the front end and let’s go ahead and take a look at the next option which is layout options and here we can set how the search box should look right now it is set to Simple Red we can set different options over here let me just go ahead and select one that matches our theme I think this kind of matches our themes so let’s keep it and you can change the placeholder text you can set the width of the box and the font family you can set the font family to the fonts of your theme and the background color and all of this options over here and then we have the results layout you can set how the results should be displayed on the screen and then we have the results behavior so how should the results be open should we be opened in a new window or not and all these options over here you can go ahead and change this and then we have the keyword highlighting
so it’ll highlight the keyword that we have searched for in the search results and then we have custom CSS so if you know some CSS you can go ahead and add your own custom CSS and make it look the way you wanted to look and lastly we have some advanced options over here so here we have the options like if there is some short code then should we execute them or should we remove them and keep the content so these are some advanced options over here you can just go ahead and experiment with this so let’s go ahead and click on save and let’s check it one small and this is all new design let’s type something and here we have the results let’s click on something and the post is being displayed over here so this is basically how you add a Live Search to your WordPress website so we had used this plugin called the Ajax light search you can go ahead and take a look at the other options over here so that’s it for this video if you have any doubts you can ask in the comments below and if you like this video please click on the like button and subscribe to this channel to get the latest video updates thanks a lot for watching have a nice day
Leave a Reply