Get a WordPress search form shortcode.
In this article, we will see how to get a wordpress search form shortcode.
- Go to https://cse.expertrec.com/newuser?platform=wordpress
- Enter your wordpress site URL and create your custom search engine
- Download and Install expertrec’s wordpress search extension from here https://downloads.wordpress.org/plugin/wp-fastest-site-search.zip
- Get your API key from your expertrec control panel and add it to your expertrec extension inside your admin panel.
- This adds search functionality to your wordpress site.
- For the search shortcode, you can add the following code to your website wherever you want to display the search box
<ci-search></ci-search> <script> (function() { var id = 'Your_api_key'; var ci_search = document.createElement('script'); ci_search.type = 'text/javascript'; ci_search.async = true; ci_search.src = 'https://cse.expertrec.com/api/js/ci_common.js?id=' + id; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ci_search, s); })(); </script>
- Replace the Your_api_key with your api key (which you can get from your control panel.
- That’s it! your wordpress search shortcode is ready.