0

I need to create special search field in my wordpress site. I need to configure this field like after tap 6 characters field automatically start search and show first result from search page. This field should start with active cursor. Is possible to create it or is any plugin to do this?

I find solution how to show first result from search page and I believe that configure active cursor is not difficult. But my only problem is to start search after tap 6 characters.

Regards.

  • Well, you´ll need some JavaScript that waits until you have typed 6 characters (seems long to me btw) and then does an AJAX-type call for the search function. You can then use JavaScript to add the search results to whatever you like to show them dynamically. On typing another letter this procedure repeats. This should give you a point to investigate more on your own. – flomei Apr 22 '16 at 7:55
0

You need to search for more information on AJAX. There are some plugins that may do what you are looking for such as: https://wordpress.org/plugins/ajax-search-lite/

Alternatively, if you want to try and develop the code yourself, have a look at the following: https://stackoverflow.com/questions/11166981/how-to-use-jquery-to-retrieve-ajax-search-results-for-wordpress https://premium.wpmudev.org/blog/how-to-use-ajax-in-wordpress-to-load-search-results/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.