WordPress is a great platform to build websites in a very efficient way and Nowadays Voice search is becoming a well-known feature provided by google. so Today I am going to explain how you can add voice search functionality into the WordPress site.
Its pretty simple and I didn’t expect that it’s very easy to implement. Let’s have a look into the following line of code:
The x-webkit-speech is an attribute of HTML5 input element with a type of text or search.It is very easy to enable this attribute in wordpress search.
First of all, Open your theme’s searchform.php file and place below the line of code into the input text field like
class="field" type="text" name="s" placeholder=" />" x-webkit-speech="true" / >
Now, Update the searchform.php file and go to the front end and check the voice search is working with the search forms in WordPress site.
That’s it.Now you have voice search in your WordPress.
NOTE:It will only work in Google Chrome and if you have installed the extension of Voice Search or if you are using the latest version of chrome