Help Center
-
Knowledge Base
-
-
-
- Articles coming soon
-
-
-
-
-
- List of all supported fields
- [Solved] Crawl error with Cloudflare website, Cloudflare is blocking crawler bot
- Expertrec Crawler - Control your Index
- Take Screenshot
- Manual extraction
- Automatic extraction
- Boost Fields
- Filter fields
- Create search for e-commerce store
- Use Existing Search Box
- Wordpress plugin
- Code
-
- KB Home
- Knowledge Base
- Archive
- Code
Code
When you sign up for a custom search engine using ExpertRec, you will get a piece of code to add to your website to take the search live.
You can get your ExpertRec custom search code by going to this link or by navigating to Install->Code in your dashboard. This page may contain two, or three pieces of code, depending on your settings in UI Customization->Search Layout.
Option 1- Overlay mode (Search results on the same page)
The first part of the code is the javascript component (just adding this code will not get the search box on your site) that enables the search functionality. Add this to the <head> section of all your pages where you want the search to work.
The second part <ci-search><ci-search> just adds the search box. Add this on the pages where you want to display the search box. Here is a JS fiddle link where you can understand what the code does.
You can fine tune the search box’s look and feel in your ExpertRec control panel from this link.
Option 2- Search results on different page mode (search results open in a new page)
If you have configured your search results to come in a different page (in UI Customization->Search Layout), you will get a third piece of code.
The <ci-search-results></ci-search-results> html code has to be added on your search results page, for displaying the search results.