Customizing Search Results

In a similar way to customizing search box, you can add additional options to the search results element.

For example, in order to change our search engine from webresults-based to image-based, we can utilize the defaultToImageSearch attribute.

First of all, you need to enable Image Search in the Control Panel for your search engine. In the Setup section, in Basics tab, click the Image search option into the "on" position. After that, add the defaultToImageSearch attribute to the <gcse:searchresults></gcse:searchresults> element on your website.

<gcse:searchbox></gcse:searchbox>
<gcse:searchresults defaultToImageSearch="true"></gcse:searchresults>

Try it

Now, when you search for something, the image search tab is showing as a default.

There are many more options available. You can read about other search results customization options in Custom Search Element Control API section.

Next...

Continue to Next steps.

Send feedback about...

Custom Search