↑ Return to SEO Plugins

P42 Google Custom Search


Page no: P42

WordPress plugin directory: Google Custom Search

Author’s plugin page: Google Custom Search page

George Dorgan Comment by
George Dorgan
My articles
Follow on:

We have set up Google custom search. Now on all of our blogs we have custom search in popup box with Google search results.

We use plugin for showing google search. The plugin is called Google Custom Search. All the functionality is made by the plugin.
It is different for every website, so it can’t be part of E-llusion plugin.

 

Google search

Google custom search

Google custom search - Click to enlarge

Overview

This plugin uses the power of Google to search the contents on your wordpress site.

WordPress has a relatively good search functionality but tends to get sluggish and doesn’t match keywords that well. This is even more apparent when your site is quite large and you have many posts and/or pages. In addition, wordpress search functionality display results ordered by date and not by its relevance to the keywords.

Google Custom Search Engine is not limited to just your site. You can configure it through google to search multiple sites/domains.

Or how about having a search Engine which searches all websites within your blog’s niche?

Combining the power of Google’s search engine along with the familiarity of their interface, this is a must have plugin for all websites.

The plugin is very flexible and you can configure both the search box and the search results.

Google Custom Search widget’s search box can be displayed as either a widget or placed anywhere in the code (php and wordpress theme familiarity required to do this).

The search results can be displayed in one of three formats:

  1. As a pop-up resizable dialog.
  2. Within the widget, under the search box.
  3. Displayed anywhere in the code (php and wordpress theme familiarity required to do this).

To display the search-box anywhere in the code, the following method should be used

<?php display_search_box($display_results_option); ?>

where $display_results_option is one of the following three options:

  • DISPLAY_RESULTS_AS_POP_UP – display the search results as a pop-up resizeable dialog
  • DISPLAY_RESULTS_IN_UNDER_SEARCH_BOX – display the search results under the search box
  • DISPLAY_RESULTS_CUSTOM – display the search results in the place you have specified.

e.g: <?php display_search_box(DISPLAY_RESULTS_AS_POP_UP); ?>

To specify a location where the search result is to be displayed, the following method should be used.

<?php display_gsc_results(); ?>

Find out more at http://littlehandytips.com/plugins/google-custom-search/

A handy plugin from little Handy Tips 🙂

Support Us and make a donation at http://littlehandytips.com/support/

Implementation

We only have to add <?php display_search_box(DISPLAY_RESULTS_AS_POP_UP); ?> where we want to. And make css correction so it will fit in our design. See the code below:

Google search code

Google search code - Click to enlarge

We use it for custom search field from google. We replace core wordpress search with Google.

 

See more for Plugins