Google XML Site Search

0

This plugin provides search functionality for your WordPress installation, through Google Site Search (aka Google Custom Search). It uses Google’s XML API, and thus requires an accoun

Version
Last updated
Active installations
WordPress Version
Tested up to
Rating
Total ratings
Tag
This plugin is outdated and might not be supported anymore.

Description

This plugin provides search functionality for your WordPress installation, through Google Site Search (aka Google Custom Search). It uses Google’s XML API, and thus requires an account that has access to it (ie you need to pay for it).

The plugin hooks in to the standard WordPress search form, so there is no need to change it (standard search widgets etc will still work). The plugin provides a basic template for the search results, but you can easily make your own if you wish to customize the output.

  • Read more about Google Custom Search here: http://www.google.com/cse/
  • Read more about the XML API here: https://developers.google.com/custom-search/docs/xml_results

This plugin is not developed or endorsed by Google.

Customizing

If you wish to customize the search result page, create a template named ‘google-custom-search.php’ in your theme. Refer to the plugin’s ‘default-template.php’ for available template functions. The functions mimic the way that The Loop works, so it should feel familiar.

For advanced users who want even more control of the output of the plugin, it is also possible to transform the response from the XML API with an XSLT style sheet. To do this, create a file called ‘google-custom-search.xsl’ in your theme. Please refer to Google’s documentation for the XML API (https://developers.google.com/custom-search/docs/xml_results) for the format of the response.

If you have a custom search form, you need to change the name-attribute of your search field to “gcs” (ie name=”gcs”) and make sure that the form action is set to the root of your site. Otherwise the search query will not be handled by this plugin.