Home » Google Custom Search WordPress Plugin

Google Custom Search WordPress Plugin

The Google Custom Search WordPress Plugin uses Google’s search engine to search your site’s contents!

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.

Also 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 with searches all websites within your blog’s niche?

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

The plugin is very flexible and you can configure the 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.

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

  • As a pop-up resizable dialog.
  • Within the widget, under the search box.
  • Displayed anywhere in the code.

Screenshots

See Google Custom Search Engine WordPress Plugin in Action

  • Little Handy Tips – We use the plugin on our own site to display the search results as a pop-up dialog.
  • Wollongong Fitness – A fitness website which has the display of the search results customized to be displayed in a different place.

Donate

If you find the Google Custom Search Engine WordPress Plugin useful, show your support and make a donation.

Donation in Support for Little Handy Tips



Email Address :



Installation

This section describes how to install the google custom search engine wordpress plugin and get it working.

  1. Upload the folder `google-custom-search` to the `/wp-content/plugins/` directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Go to the Options and configure the Google Custom Search.*
    *You might need to setup a Custom Search Engine Account with Google.
  4. Add Google Custom Search Widget.

Advanced Configuration

Display Search Box

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 – displays the search results as a pop-up resizeable dialog
DISPLAY_RESULTS_IN_UNDER_SEARCH_BOX – displays the search results under the search box
DISPLAY_RESULTS_CUSTOM – displays the search results in the place you have specified.

Below is an example.

<?php display_search_box(DISPLAY_RESULTS_AS_POP_UP); ?>

Display Search Results

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

<?php display_gsc_results(); ?>

Change Log

  • Version 1.3.4
    • Fix compatibility issue with wordpress 3.4.
    • Fix issue with pop-up box display not working on some browser.
  • Version 1.3
    • Added multilingual support.
    • Added option to have results displayed in current window instead of a new window.
    • Added option to not display search button.
  • Version 1.2
    • Fixes problem where plugin interferes with other wordpress drag and drop functionality.
  • Version 1.1
    • Added support for multiple custom search boxes in a single page.
  • Version 1.0
    • Initial Release

Frequently Asked Questions

Q. Does this plugin replaces the wordpress plugin?

Yes and No.
The Google Custom Search plugin does not override the wordpress search functionality.
You can choose to have it replace wordpress’s search but removing their search and putting this plugin instead.

Q. My current website search box is not in a widget. Can I replace wordpress search with this plugin?

Yes. You sure can.
You will need to modify the wordpress theme you are using and replace the wordpress search code with this plugin’s API.

To display the search-box anywhere in the code, refer to the section above on Advanced Configuration

Q. How do I specify where the search results are to be displayed?

The search results can be configured within the widget to display in one of three options.

  • As a pop-up dialog.
  • Within the widget.
  • In an area you specify.

If you want to specify the location for the results to be displayed, you will need to do the following.

  1. Make sure the setting on the widget for “Display Results” is set to “Elsewhere”
  2. Add the following line of code into your wordpress theme at where you want to results to be displayed.

<?php display_gsc_results(); ?>

Q. Can Google Custom Search search other/multiple websites?

Yes.
This configuration will need to be done with Google and documentation for that is provided by them.
Go to http://www.google.com/cse/manage/all to configure your Google Custom Search Engine.

Q. How do I create a Google Custom Search Engine?

Go to http://www.google.com/cse/manage/create and follow the instructions.

More Questions or Comments?

There is now a Forum for supporting this plugin

As there are now too many comments on this page, I’ve created a forum for support of the plugin. It’ll make it easier for plugin users to browse through the list of questions which have already been asked before. If you have any questions regarding the plugin, please go to http://forum.littlehandytips.com

If you’re having problems with getting the plugin to work, take a look at 3 Easy Steps to Diagnose WordPress Plugin Problems.

Also even though the plugin is free, providing support can be time-consuming. Therefore if you like to make a donation, it will be greatly appreciated. I don’t always have time to respond to all support requests, but if you make a donation, I will make your question a priority. Thanks.

Donation in Support for Little Handy Tips



Email Address :





277 Comments »

  • Pingback: Unleash Google's Search Engine on Your Site | Little Handy Tips

  • Swashata Ghosh said:

    This is a really a nice plugin buddy! I really like the search result interface using the jQuery UI! Would be great if u make one for Adsense for Search also…

    Reply
    • edwin said:

      Thanks for the positive feedback Swashata.
      Google Custom Search allows a user to monetize it by linking it to Adsense, but a Adsense for Search plugin is definitely something worth considering!
      Thanks for the tip!

      Cheers,
      Edwin

      Reply
    • Sandeep said:

      hello sir thanks for your reply this is the very best plugin i have ever seen because again doing changes in codings of website always creates problem and you introduced this best way to get out of that problem
      sir kindly check my website and please give me some suggestions here

      thanks once again.

      Reply
  • Lou Anne McKeefery said:

    thank you for the great solution

    Reply
  • Lou Anne McKeefery said:

    Can I use the code more than once on the page? Sidebar and footer is what I need and it doesn’t seem to work.

    Reply
    • edwin said:

      Hi Lou,

      Thanks for your feedback on the plugin.

      Version 1.0 of the plugin does not allow having more than 1 google custom search box on the page.

      Having received your feedback, I’ve just released version 1.1 which supports having multiple search boxes on a single page.

      Cheers,

      Edwin

      Reply
  • Pingback: How to Create Professional Looking Menus using CSS | Little Handy Tips

  • Leo said:

    Good plugin , but I have a problem. If I active the plugin. Google Custom plugin kill my WordPress WYSIWYG editor popup function. Need inavtive Google Custom Search.

    Reply
    • edwin said:

      Hi Leo,

      Thanks for the feedback. Is the WordPress WYSIWYG editor an external plugin? I don’t seem to be having the problem you mention.

      Also what version of wordpress are you using?

      Thanks,

      Edwin

      Reply
  • Leo said:

    Hi Edwin,

    I am using WordPress 3.0.1 and default WYSIWYG editor. When I active Google Custom Search plugin and edit old post. The upload photo window not popup. Thanks for you support.

    Reply
    • edwin said:

      Hi Leo,

      Are you only having the problem with old posts?
      Also what web browser are you using?

      Regards,
      Edwin

      Reply
      • Leo said:

        Hi Edwin,

        I am using Chrome Browser. The problem with new & old posts. After install the Google Custom Search plugin. I cleared the browser cache and WordPress cache.

        When I inactive Google Custom Search plugin. The WordPress WYSIWYG editor work fine. I tried re-active Google Custom Search plugin and the WYSIWYG editor problem comes again.

        Thanks for you help.

  • Chris said:

    Edwin,

    I think I’m having a similar problem as Leo describes.

    My drag-n-drop on the widget config page is fine then I activate the GCS plugin and the widgets become ungrabbable. I deactivate the plugin and they are back to their draggable selves.

    I’ve tried this on Mac OS 10.6 with latest versions of Safari, FF, and Chrome.

    I’m on WP 3.01 with the 1.1 plugin.

    Thanks!

    Reply
    • edwin said:

      Hi Leo and Chris,

      I have a new version of the plugin available which should address the issues you both are having. The fix is in version 1.1 of the plugin. Please let me know if you’re still having problems.

      Regards,

      Edwin

      Reply
  • Leo said:

    Hi Edwin,

    The new version fixed the WYSIWYG problem. Still have problem. The Widget only show within widget if I use popup.
    Thanks for you help.

    Reply
  • Chris said:

    Edwin,

    That did it for my widget issue.

    Thank you for the great plugin and support!

    C.

    Reply
  • Leo said:

    Hi Edwin,

    My url http://www.plzon.com ?The Google Custom Search plugin widget using pop-up, but the search result still show within widget.Thanks!!!

    Reply
  • Leo said:

    Hi Edwin,

    Cool, The version 1.2.1 resolved the pop-up problem,Super Thanks for help.

    Reply
  • tiara said:

    hi. I added the plugin on another site, entered the id then added the widget. I tested it, a pop up box shows up but doesnt show any results… any ideas?

    Reply
    • edwin said:

      Hi Tiara,

      Thanks for installing the plugin. :)

      What is your search engine id?
      And what’s the url for the website you have the plugin installed.

      I’ll test your search engine id out and also take a look at the plugin on your site to see if I can determine the issue.

      Reply
  • Alok Saboo said:

    Hi,

    I was using the earlier version of the plugin and it was working perfectly. However, since I updated to 1.2.1, the google search has stopped working. Do not see any results. Can you please help…thanks!!

    Reply
    • edwin said:

      Hi Alok,

      I’m looking into this now. Do you know which version which was working perfectly for you? Version 1.0, 1.1 or 1.2 ?

      Reply
  • Josh said:

    I am having the same issue. I just downloaded the latest version. I thought that maybe I typed my website in wrong through google custom search control panel, but everything is fine. Not sure why it isn’t working.

    Reply
    • edwin said:

      Hi Josh,

      Just want to let you know that I’m looking into this.

      I just noticed that the you have an extra whitespace at the end of your Search Engine unique id.

      e.g:
      “095382442174838362754:hisuukncdfg ” when it should be
      “095382442174838362754:hisuukncdfg”

      Could you please go to the google custom search options and remove the whitespace at the end of the search engine unique id and let me know if that fixes the problem.

      Thanks,

      Edwin

      Reply
      • Josh said:

        Hey Edwin,

        Sorry for the slow reply! I honestly wasn’t expecting such a quick reply. I am really impressed with your plug-in and hard work you have done.

        I feel a little dumb. I went in and did the recommended change to my search engine id and it fixed the problem. I can’t believe I looked that over!

        Thanks for your help. It is a new site so it isn’t picking up everything yet. But your plug-in is working perfectly!

        Thanks

    • edwin said:

      Hey Josh,

      Thanks for the compliment. Glad to hear that the plugin is working good on your site!

      Reply
  • matt said:

    Hello, Thanks so much for the plug in . I do have a question however. How do i get the search widget to display the results on a different page? not a pop up or with in the widget. I want to send the results to a new page. On the new page i want to edit the look too so it doesn’t look like the front page. Please let me know if i can some how put in a redirect url or something. Thanks so much

    Reply
    • edwin said:

      Hi Matt, thanks for downloading the plugin.
      The plugin isn’t designed to display the results on a new page.

      However I might include this option in the plugin’s next release.

      Stay tuned!

      Edwin

      Reply
      • Matt said:

        Thanks so much for the very quick response. the client will just go with the pop up until this is implemented. Thanks again Edwin you are a superb developer.

      • Jason said:

        Any update on if you’ll add the functionality to display the results on a different page? If this was implemented, this plugin would be perfect :)

  • Clinton said:

    Hi Edwin,

    Hope you are well and thank you for creating this plugin :)

    I’ have two questions.

    1. Can you add ad sense ads for the popup option?
    2. How do I get the search to only search my website cause it shows results not relevant to my page. I’ve used my unique setup Search engine unique ID

    Reply
    • edwin said:

      Hi Clinton,

      Thank you for downloading the plugin. Below are the answers to your questions.

      1. Can you add ad sense ads for the popup option?

      Currently, I’m not sure how to add adsense for popups. When you use google custom search, it looks like google displays the search results first before displaying the adsense. I suspect the rendering of the popup box (with its different size) is causing the ads to not appear.

      2. How do I get the search to only search my website cause it shows results not relevant to my page. I’ve used my unique setup Search engine unique ID

      To do this, you need to configure your google custom search engine using the following steps.

      Step 1) Go to http://www.google.com/cse/manage/all (you might need to login to google before going to that link).

      Step 2) Go to the Control Panel for your search engine.

      Step 3) Once in the Control Panel, using the menu on the left column, click on “Sites”

      Step 4) Then you need to enter the url for what you want the custom search engine to restrict the search to. For this website, I used *.littlehandytips.com/*

      Hope this helps and apologies for not being to get the adsense ads appearing on the popup option.

      Reply
  • Pingback: Wordpress Security Tune-up Tips | Little Handy Tips

  • marvin said:

    could you be more specific in stating your tutorials? Its too general

    Reply
  • Mike Kieffer said:

    I am using your google search on my wordpress blog, and love it. The only question I have, is how do you get it to not open a new brower window when someone clicks on a search link?

    Reply
    • edwin said:

      Hi Mike,

      The plugin currently only have the functionality to open the search links in a new browser.

      I can add an option to choose whether to the links open in either the current browser window or a new window.

      But if it is opened in the same window, then the search results will be gone (as the browser will load a new page). Is that what the intention is?

      Let me know if this is something that you like and I should have a new version of the custom search available in a few days time.

      Cheers,

      Edwin

      Reply
    • edwin said:

      Hi Mike,

      I’ve just released version 1.3 of the google custom search wordpress plugin. There is now an option in the settings to have results displayed in the existing window, instead of a new browser window.

      Edwin

      Reply
  • Rafael Ribeiro said:

    Hello,

    I want to remove the “search” button in the widget, but I can’t change the code to do so.

    See my blog and you will understand why I wanted removed hehehe

    How could I change that?

    Reply
    • edwin said:

      Hey Rafael,

      Sorry, but I haven’t been able to figure out how to remove the search button. It’s automatically created by Google Custom Search. I’ll let you know if I figure it out.

      Cheers,

      Edwin

      Reply
      • Yannick said:

        Add this code to gsc.css I try and it work

        td.gsc-search-button {
        display: none !important;
        }

        div.gsc-clear-button {
        display: none !important;
        }

    • edwin said:

      Hi Rafael,

      I’ve just updated the google custom search wordpress plugin to version 1.3. There is now the option to remove the search button from the plugin settings.

      Cheers,

      Edwin

      Reply
  • Rafael Ribeiro said:

    Hello Edwin,

    I don’t know why, but my post was deleted.

    I want to remove the “search” button from my widget.

    How can I do that?

    Reply
  • andrea said:

    When in WordPress admin pages, where do you insert the Google unique id to limit the search?

    Reply
    • edwin said:

      Hi Andrea,

      In the WordPress Admin pages, there is a option called “Google Custom Search” under settings where you can insert this Google unique id.

      Cheers,

      Edwin

      Reply
  • yagelski said:

    Nice job with the plugin. It works as advertised.

    I was able to slightly change the look and feel of the search box, button, and pop-up search results window to match my website by modifying the CSS file (see http://www.concertinamusic.com/ ). However, there are some limits to what can be done, mostly due to the Google javascript.

    It would be great if you could find a way to add options for the button label (i.e. “Go” instead of “Search”) or button style.

    Thanks!

    Reply
    • edwin said:

      Hi Yagelski,

      Thanks for the feedback. I like the way you have customized the search box to match your website’s theme. And like you said, it is difficult to modify the button label as it is rendered by Google.

      Edwin

      Reply
  • Yosefcz said:

    Fix for multilingual:

    For search-box.php

    <div id="” style=”width: 100%;”>

    google.load(‘search’, ’1′, {language : ‘<?php echo get_locale() ?> ‘});

    http://pastebin.com/bmGMXbps

    Reply
  • DrLightman said:

    The plugin is very good, but I’m not understanding if it is the same of “AdSense for Search” or not. Contextual AdSense ads are alwyas displayed, or not?

    Reply
    • edwin said:

      Hi DrLightman,

      I’m not too sure either, but in terms of the Ads, I think it is the same as “Adsense for search”.

      Reply
  • DrLightman said:

    Apologize, it’s always me. But I don’t seem to be able to make the results load into a static page by template, let’s say /google-search/ , how could this be achieved?

    Reply
    • edwin said:

      Hi DrLightman,

      The google custom search wordpress plugin does not display the results on a static page. That was never the intention of the plugin.

      The plugin allows 3 different ways for displaying the results:
      - As a pop-up lightbox
      - Under the search box in the widget
      - or in a custom location in the same page.

      Hope this helps.

      Edwin

      Reply
  • Santhosh from Agile virtual said:

    I 100% agree that, it is a great plug-in, I am a new blogger and will try to donate at a later stage.

    Reply
  • Jarby said:

    I try to use the plugin but the pop up option dont work, the results appear in the top of the page.

    Reply
    • edwin said:

      Hi Jarby,

      It sounds like you might have another <div> tag which have the same id as the pop-up search results box. The pop-up search box uses id=’dialog’. Maybe I might try to release a new version of the plugin with a unique id.

      Reply
  • Jason said:

    Great plugin What is the small red black box with the red 1 at the bottom of my pop-up search results?

    Thanks in advance.

    Reply
    • edwin said:

      Hi Jason, the black box is to indicate the number of pages for the search results. For your case, there was only 1 page of results for the search term.

      Reply
  • Paulo said:

    My cse is configured to search in same sites. When I use the plugin it searches all the web. Somethin wrong?

    Paulo

    Reply
    • edwin said:

      Hi Paulo, double check the google custom search id that you have entered into the plugin. make sure there are no spaces after the id. That could be a possible cause.

      if that doesn’t solve the problem go to Google custom search control panel http://www.google.com/cse/manage/all and preview your custom search engine. That way you can confirm if your cse configurations are correct.

      Reply
      • Paulo said:

        Thank You.
        Now that’s ok: partner-pub-095382442174838362754:hisuukncdfg (e.g). In the first time I inputed in the plugin the id without “partner-pub”, just the numbers. Was the exemple in the plugin instrutions.
        Another question: where must I put the code to obtain the results in the main frame, like in Wollongong Fitness?

        Paulo

      • edwin said:

        Hi Paulo,

        For the results to appear on the main frame like in http://WollongongFitness.com, you need to make the changes in your theme’s template. This can be done under the Appearance -> Editor menu in the wordpress admin area.

        It’s hard to say where to put the code as it depends on how the wordpress theme is structured. The best way is to play around with it using trial-an-error before you’ll find a good spot for the code.

        For wollongong fitness, the code was added into the “Main Index Template” (index.php). It was added to the second line, right under

        <?php get_header(); ?>

        and the code that was added was:

        <!– Google Site Search –>
        <?php display_gsc_results(); ?>

        The code can be found

        Hope this helps.

        Edwin

  • Al Miller said:

    You said the following…

    2. Add the following line of code into your wordpress theme at where you want to results to be displayed.

    Now, where exactly do I place this code into the theme?

    I want to place it so it could look like the example you have shown.
    http://wollongongfitness.com/

    Do I place this code in the Page??? maybe???
    Please help me understand what you mean when you just say place this code in the theme.

    Thanks,
    Al

    Reply
    • edwin said:

      Hi Al Miller,

      You need to edit your wordpress theme template files. This can be done under the Appearance -> Editor menu in the wordpress admin area.

      It’s hard to say where to put the code as it depends on how the wordpress theme is structured. The best way is to play around with it using trial-an-error before you’ll find a good spot for the code.

      For wollongong fitness, the code was added into the “Main Index Template” (index.php). It was added to the second line, right under

      <?php get_header(); ?>

      and the code that was added was:

      <!– Google Site Search –>
      <?php display_gsc_results(); ?>

      The code can be found

      Hope this helps.

      Edwin

      Reply
      • Mukesh said:

        If you add it just to the index.php file the the search results will only show when the user searches from the homepage. As soon as they leave the homepage to goto say a Category page then the search box doesn’t work. you actually have to go to every php file and add this snippet of code mentioned. Also when you do this the search results just push down the content on that page, it doesn’t reload the page. So you don’t actually capture a “page view” for search in Google Analytics. I see a lot of holes when using custom search results… or am I missing something?

      • edwin said:

        Hi Mukesh,

        That depends on the theme you are using, you might be able to get away with putting the snippet of code in the header.php file too.

        Edwin

  • Rick WIlkes said:

    Hi! Really nice plugin but like others, the CSS styling issues are major. Very hard for me to get this to look remotely nice in a 160px sidebar. I didn’t realize Google was the one dictating the entry form layout. I was just hoping for a simple field without the clear [X] nor the separate “Search” button. Anyone figured out the CSS to do that??

    Thanks,
    Rick

    “WordPress Search is TERRIBLE!”

    Reply
  • Wendy said:

    Thank you for the plugin, it’s the best solution I’ve found for integrating the search function between my organization’s main website and the various WordPress installs we use for additional functions.

    One quick question, though. My WordPress theme has a fairly narrow sidebar where the widget will be placed. Is there any way to format the search box so that the “Search” button appears below the input box? Currently the button overlays the box and will only show three characters.

    Thank you!

    Reply
    • edwin said:

      Hi Wendy,

      The custom search box and “Search button” are generated by Google and so far, I haven’t been able to find a way to move it or remove it.

      If I discover how to do it, I’ll put that option into the plugin.

      Sorry about that.

      Edwin

      Reply
  • tommy said:

    Hi,

    Thanks for the plugin.

    One question, how can I display the results in a page?

    Thanks

    Reply
  • Krissy said:

    I love this plugin but it keeps searching the entire web instead of my site like I have it configured in Google. Maybe this is a google issue. I’m not sure.

    Reply
    • edwin said:

      Hi Krissy,

      Double check the search engine unique id that you have inserted. It should look something like the following:

      partner-pub-095382442174838362754:hisuukncdfg

      Also make sure there are no spaces at the start and end of the id.

      And if that still doesn’t work, go to Google custom search control panel http://www.google.com/cse/manage/all and preview your custom search engine. That way you can confirm if your cse configurations are correct.

      Reply
  • eXtide said:

    hi, ctrl+f hasnt found anything, so i try it this way:

    i have selected the option to display the search results as a popup. ist there a possibility to open the links from the results in the same window? can i replace some code with something like “a target = _self” somewhere in your code (coundt find it myself)?

    sincerely,
    extide

    Reply
  • eXtide said:

    Hey i have got it, may be some1 else has got the same problem as me

    if you want to open the results, which are being displayed in the pop-up mode, in the same window, here you go:

    open searchbox.php and add the line

    customSearchControl.setLinkTarget(google.search.Search.LINK_TARGET_SELF);

    right after “customSearchControl.enableAds(’2496164227′);”

    Sincerely,
    Sergey Kovalev

    Reply
  • Yannick Delorme said:

    Hi, i love your plugin and it work perfectly except for one thing, the pupop option doesnt work in internet explorer.

    Its perfect in firefox and in chrome.

    Thanks

    Reply
  • RichC said:

    I’m please with the function of this better search option for WordPress blogs, but haven’t figure out a better way to modify the search box and button. There must be a better way to create a ‘slimmer’ search option for those using narrow sidebar columns?

    Is there any way to use the Google ‘default’ look that has CSS coding of a slimmer button and smaller text box?

    So far this is definitely an improved search for WordPress installs.

    Reply
  • Rich said:

    Great plugin! Thanks!

    I am using it on Links.com as a pop-up. There doesn’t seem to be a vertical scroll bar available on the pop-up. Is this how it was meant to be?

    Thanks again.

    Reply
  • JohnRoach said:

    Hi. I have added as pop-up but the pop-up turns out behind my video posts (youtube embedded) Is there a way to resolve this.

    Reply
    • edwin said:

      Hi JohnRoach,

      It looks like only a very small section of the pop-up box is behind the youTube post. It’s not blocking the search results text and the pop-up box is movable.

      Edwin

      Reply
  • Peter said:

    Hi, nice plugin.

    I have 3 questions.

    1- Do you plan to add the option to display results in a page ? (is there a hack in the meantime ?)
    2- Theres no option to change the text of “search” and “Search results”, that would be nice for translations.
    3- How to enable adsense for search ? As the popup does not display them.

    Thanks.

    Reply
  • edwin said:

    Hi Everyone,

    I’ve just released version 1.3 of the google custom search plugin.

    The changes are:
    * Added multilingual support.
    * Added option to have results displayed in current window instead of a new window.
    * Added option to not display search button

    Reply
  • cezar said:

    Hi Edwin,

    i get this error when activating:

    Fatal error: Cannot redeclare gsc_activate() (previously declared in /…absolute path…/wp-content/plugins/google-custom-search/google-custom-search.php:37) in /…absolute path…/wp-content/plugins/google-custom-search/google-custom-search.php on line 38

    any ideas?
    thanks,

    Cezar

    Reply
    • edwin said:

      Hi Cezar,

      From the Fatal error message you printed, it sounds like the gsc_activate() is declared twice, once on line 37 and another on line 38?
      Can you take a look at that file to see if this is the case? You can do that by going to the wordpress dashboard and under Plugins, select Editor and then select on the google custom search plugin.
      Then select to edit/view file google-custom-search.php

      Also what version of the plugin are you using? Is it version 1.3?

      Cheers,

      Edwin

      Reply
      • cezar said:

        not sure how, but that sorted itself.
        i am now facing another issue. it doesnt seem to allow multiple instances. trying to add one in header and one in the body of a page. doesnt work anymore. the one in the header doesnt display results anymore.
        the one in body does not show the autocomplete and displays results from google not my site.
        did i do something wrong?
        thanks

  • edjusted said:

    I’m also having a Fatal error after I upgraded to the latest version this morning (sorry, I can’t tell what it is as it just shows version 1.3). When activating, it says “Parse error: syntax error, unexpected T_VARIABLE, expecting ‘,’ or ‘;’ in /home/amincous/ramenramenramen.net/wp-content/plugins/google-custom-search/installer.php on line 14″.

    Any idea what the problem is?

    Reply
    • edwin said:

      Hi edjusted,

      Thanks for highlight this problem. I’ve fixed it and have released it as version 1.3.1
      And you got me thinking of getting ramen for lunch now! :)

      Cheers,

      Edwin

      Reply
  • grobegni said:

    You mention that in version 1.3 you have added an option to not display search button. How do I activate that option?

    Thanks

    Reply
    • edwin said:

      Hi grobegni,

      you can set to not display the search button in the plugin’s settings options page. This is the same page where you would enter your google custom search id.

      Cheers,

      Edwin

      Reply
  • Luiz Coelho said:

    Hi Edwin. This plugin is just fantastic.

    We were trying to integrate google custom search to our church’s news websites, and it works fine on the English one ( http://ns.ieab.org.br ). However, the one in Portuguese ( http://sn.ieab.org.br ) shows a blank popup window only. If I change the widget settings to “within widget,” it works just fine. Do you have any idea of what could be happening? We’re using the latest version of this plugin.

    Thank you very much.

    Reply
    • edwin said:

      Hi Luiz,

      I just took a look at your website and I’m not sure why it is not working for the Portuguese site.
      I’ll keep investigating and will let you know if I discover what the issue is.

      Thanks,

      Edwin

      Reply
  • daniel spillers said:

    In your 1.3.1 js/gsc.js file, the dialog array has an extra comma at the end (line 9) after modal: true:


    // Dialog
    $('#dialog').dialog({
    autoOpen: false,
    width: 600,
    modal: true,
    });

    I think most browsers take this as a valid array, but IE 7 barfs on it. Removing the trailing comma allowed IE7 to build the interface correctly.

    Reply
  • cezar said:

    re-posting this. i’m afraid it got lost in the flow. anyone has any solution?
    it doesnt seem to allow multiple instances. trying to add one in header and one in the body of a page. it doesnt work anymore as it should. the one in the header doesnt display results anymore.
    the one in body does not show the autocomplete and displays results from google not from my site.
    did i do something wrong?
    thanks

    Reply
  • cezar said:

    unfortunately it seems there isn’t a solution to this. too bad. otherwise, the plugin was good.
    cheers,
    Cezar

    Reply
  • Stig Ulfsby said:

    Thank you for this great plugin. But I have a problem: When I select Hide Widget Format, the search box comes under the title of the widget below. What is meant to happen?

    I have a multilingual site (with automatic translation by Transposh plugin). Google return search results in all languages. Is there a way to configure the results to be in the same language as the page you search from like the WordPress search?

    Reply
    • edwin said:

      Hi Stig, from what i know, the google search should return results in the language defined by the browser. So if the browser’s language is Norwegian, then I should think that the results be returned in that language.

      Reply
  • Heather said:

    Hi,

    Love this plug-in, thank you!
    Just to let you know there is a typo in gsc.js – an extra comma on line 9. Throws up an error in IE….

    H :)

    Reply
  • edwin said:

    Thanks Heather for the feedback.

    Reply
  • karen said:

    Thanks for the plug in but where do I put the codes? I added the code for the Google Custom Search widget on the sidebar and that shows up on the sidebar but not yours.

    Reply
  • Jasjot said:

    hi :)
    i would like to know how:
    1.I can replace my wordpress search with this plugin
    2.Add code for adsense ( i have a valid adsense account,i just dont know where to put the code :D )
    3.How can i customise the search page to open in a new tab,displaying the ads on top?
    P.s-my website is in wordpress,and the only knowledge i have of html/php is how to hyperlink :( :p
    Thanks in advance :)

    Reply
  • dzooky said:

    I see only loading if I try it with insert code () to page.
    Why?

    Reply
  • Erwin said:

    Hi Edwin,

    Why does Google Custom not find the newest posts? My website loads new posts every hour or so (via RSS), but when searching it seems to show only the older posts and not the new ones. What can I do to solve this problem? Thanks in advance!

    Reply
    • edwin said:

      Hi Erwin,

      Google custom search plugin uses google to search the contents of your website. If it is not showing up, it is probably because google hasn’t indexed yet site yet.

      To solve the problem, you can use Google Webmasters tools, create a profile for your site and have the google crawl bot index your site more regularly.

      Hope this helps.

      Edwin

      Edwin

      Reply
  • Joe said:

    Can I customize the search results so that 1.) it only searches a posts’ tags. and 2.) when it shows the search results the whole post is shown not just post’s title?

    Reply
  • krishna said:

    It is great plugin and awesome support … just want to know if there is some hack to use the plugin with adsense for search ?

    Reply
  • 411 New York said:

    This works great on /guide/
    We will be rolling it out to /clubs/events/ and /media/

    Question. Is it hackable to run on a non-wordpress page?
    The homepage in not wordpress but it is based on php.

    Reply
    • edwin said:

      Hi 411 New York,

      To use the google custom search on a non-wordpress page, simply login to google custom search control panel and copy the code snippet to your site.

      Cheers,

      Edwin

      Reply
      • 411 New York said:

        That is what we have there but we won’t have your popup feature.
        Eventually, we will install WordPress in root then mod the skin.
        The drawback is the use of server space and another SQL database.

        If I see how to emulate it on a non-wordpress page, I’ll say
        in your “share a tip” section.

  • Daniel said:

    On the Wollongong Fitness site the search results appear stacked vertically. The results appear cleanly. On my page the search results show up vertically and with some on the right. The right side overlaps the sidebar. How do I get the results stacked like the Wollongong site?

    Reply
    • edwin said:

      Hi Daniel,

      I believe the problem is in where you put the display search results code <?php display_gsc_results(); ?>
      You put that snippet code between <div id=”main”> <div id=”container”>

      I think it should be placed just after
      <div id=”container”>

      try than and see if it works.

      Reply
  • Daniel said:

    Hi Edwin,
    I moved the code to where you said and its giving me a problem. Now the search results overlap the sidebar. How do I fix it?

    Thanks!

    Reply
  • Daniel said:

    Hi Edwin, can you please help me with my website issue? Please see my prior comment.

    Reply
    • edwin said:

      Hi Daniel, apologies for only replying now as I had been away on travels for the last few weeks. I took a look at your site and it seems like you managed to get it fix. It’s looking great now.

      Reply
  • Kenneth said:

    Hi,

    This is a really useful plugin, but I wonder if there is any way to control the font color of the search button text… there doesn’t seem to be an option on the Google site, and I’ve had a poke around the css file and can’t find a way to do it… any thoughts?

    Many thanks!

    Reply
  • jc said:

    First off, thank you so much for this beautiful add on. It is rare to find something so useful for free now a days.

    After reading “all” of your comments ( i didn’t want to ask something someone else already did). I have want might be a simple question. I love my search bar on my site, it is integrated well into my header. I was hoping to use it as my search bar and not the google one.
    Is it possible to ad a line of code to keep the integrity of the original search bar and have it give me the results that your plugin gives?
    Thank You in advance
    - J.C.

    Reply
    • edwin said:

      Hi jc,

      Not sure what you mean here. Are you asking to use the existing wordpress search box but display the google custom search results?

      Reply
  • Chris said:

    Popup does not work on current versions of Webkit based browsers tested in Safari, Chrome and Midori all display the popup at the top left of the browser.

    Reply
    • John said:

      Hi there,

      Wonderful plugin.. but i’m having the same problems as Chris.. The pop up window worked fine a few days ago but now it’s displaying the search results in the sidebar itself.

      Any fix for this?

      Problem seems to be with Firefox 3.6, Chrome, Safari, Opera.

      Reply
  • John said:

    Hey.. ignore my comment.. i checked a bit and it was a plugin conflict.. Better WordPress Minify that was causing the issues.

    For others, would be a good idea to de-activate and then reactive the plugins one by one to eliminate a plugin conflict issue.

    Cheers.

    Reply
  • Geraldo Eustaquio said:

    Hi,
    I’m just finishing this site. I’ve got your plugin and it works really fine, thanks. The only problem is the google button. I can not use it because it is so big and so ugly. And I can’t figure out a way to change it. Could you give me any idea? Thanks.

    Reply
    • edwin said:

      Hi Geraldo,

      You might one to try playing around with the gsc.css file to see if you can change it. But I doubt you have much flexibility. Took a look at your site and saw that you have removed the button altogether, that looks quite well for your site.

      Reply
  • Andrea said:

    Nice plugin, but it breaks my site’s layout.

    I don’t use the widget, I call the display_search_box() function directly on my functions.php

    I see that it generated a table (I don’t like tables, but I can live with it) and that is create an ID “cse-search-form99″. I suppose that the “99″ isn’t a permanent number. Could be possible to have also a colass for this table?

    Even better, I’d liek to suggest a new feature, where users chan create a template file in their’s template folder.

    Thanks.

    Reply
    • edwin said:

      Hi Andrea,

      You’re right that the 99 isn’t a permanent number. This was introduced because some users like to add more than one search engine box to their website. What’s a colass??

      Also thanks for the suggestion for the new feature.

      Edwin

      Reply
  • Marty said:

    Hi, Edwin,

    Thank you very much for creating and maintaining the excellent Google Custom Search plugin.

    I noticed you’re running it with no problems in WordPress 3.1.2. For me, the latest WP update seems to have broken the plugin. Results no longer open in a new window — they shoot down the sidebar. Are there any incompatibilities with other plug-ins that you are aware of that maybe I should check? Thanks!

    =M=

    Reply
    • edwin said:

      Hi Marty,

      I’m not sure if this is an incompatibility problem or a configuration issue. Take a look at your widget for the google custom search and check what the settings are for “Display results”. I have a feeling you have that set to “within widget”.

      Cheers,

      Edwin

      Reply
      • Jeff said:

        I also can’t get a pop-up window to work on a new 3.1.2 installation…
        I do have Pop-Up chosen in the widget.
        Pop-up blocker is disabled on my machine.

        Thanks for your great support !

      • edwin said:

        Hey Jeff,
        The cause is probably a conflict with other plugins. Could you try disabling all other plugins and see if you still have the problem? Then enable the plugins one at a time and testing the google custom search to identify which plugin is causing the issue.

        Thanks,

        Edwin

  • Bob said:

    Edwin, great plugin!

    For anyone having problems with the popup window top bar being obscured by the new WordPress menubar feature, you can add a height option for the popup window in google-custom-search/js/gsc.js. I changed it to 500 pixels as follows:

    // Dialog
    $(‘#dialog’).dialog({
    autoOpen: false,
    width: 600,
    height: 500,
    modal: true
    });

    Edwin, can I suggest you add this to the next version? Also, would love it if you could figure out how to get the adsense ads into the popup.

    Reply
    • edwin said:

      Thanks Bob, That’s a great tip. Will have to put that into the next version. Many thanks for that! Also with the ads, that’s something I still haven’t figured out yet. Will put that in when I have figured them out.

      Edwin

      Reply
  • max said:

    Hi edwin..,
    i have an idea to display both from the wordpress search result and google search result in my blog, what i mean is, when someone searching in my wordpress default search, it will also display the search result from google search result, so it will automatic display both search result. here what i mean :

    if someone search in wordpress default search, then the term will be as : , in wordpress searchresult (search.php), i also want to display the visitor search query in google custom search, maybe in here =”display_search_box();” it will automatic add to display both result, how can i do that..? Need your advice, thanks.

    Reply
  • max said:

    i just need to add : the_search_query(); function to google custom search box, so it will display both query from wordpress and google custom search result.., how to do that..? thanks

    Reply
  • Sergio Mura said:

    I’d like to tell you “thank you”. This is a beautiful plugin and I was looking for something like this for a while.
    Again… thank you!

    Reply
  • Haisa said:

    Hi, Edwin
    I love the plugin. But the theme doesn’t like it. The pop up window doesn’t work. I guess there is conflict with the theme I am using because it is fine with the default twentyten theme. This is the theme I use http://www.simplewpthemes.com/?s=numerto&x=30&y=12 (numerto magazine)
    Could you give me some advice on how to get rid of the conflict? Or should I turn to the theme Author for help? Thanks in advance.

    Reply
    • edwin said:

      Hi Haisa,

      What’s the address for your website? I like to take a look at it and see if I can identify what the conflict is.

      Edwin

      Reply
  • yelunra masha said:

    hei i need some help the plugin works fine but i deleted a post for like 2 days, and the plugin still only comes up with that post, it dosent bring up my newest post that i took all the conten from the old one and in the new post, when i also try to search on my new post with the topic or something in it, it only comes up with the old one i deleted, when i click on it i get the error that the page isnt there

    Reply
    • edwin said:

      Hi Yelunra,

      The plugin uses Google search to get the results. What has happened is that Google hasn’t updated their search listings for your website yet.
      I’m not sure how often Google crawls through your website to re-index their search listings. You can find out more information about that at http://www.google.com/webmasters/. You will also be able to dictate Google’s web crawl frequency on your website through the settings in http://www.google.com/webmasters/.

      Hope this helps,

      Edwin

      Reply
  • sandeep said:

    sir hep me i am confused that small red black box with the red 1 at the bottom of my pop-up search results? what is that please make a reply thanks wus

    Reply
    • edwin said:

      Hi sandeep,

      The red 1 at the bottom of your pop-up search results means that there is only 1 page worth of results that met the search criteria.

      Hope that clears things up.

      Edwin

      Reply
  • Noel said:

    Any chance of a bit of help? I seemed to have no control of resizing the width of the Search Box. I tried looking where to set it but no avail. Where and how can I do the resizing please? Thank you very much.

    Reply
    • edwin said:

      Hi Noel,

      try modifying the gsc.css file for the plugin.

      in input.gsc-input{} add the width option

      eg:
      input.gsc-input{
      width: 50%
      }

      this will make the search box fill 50% of its available space.

      I haven’t tried it, but I think that should do it.

      Edwin

      Reply
    • David said:

      I too had problems with having the search bar come up full size instead of shorter; I finally figured out a way around it, and it just involves setting the size of the relevant area that you are putting the search bar in in the CSS of your site. For example, I use the Suffusion theme and, although I kept putting it in the small area on the right hand side of the header, it took up the full header, making it overlap and go above the rest of the header, which didn’t look right at all. But, if I set the area to a specific size in the CSS, it stuck to that size. The “right header widget” area (as Suffusion calls it) that I was trying to put the search bar in is called #right-header-widgets.warea (yes, complete with “w” before “area”) apparently, so i just added a line of code to the base CSS that said:

      #right-header-widgets.warea {width: 200px; height: 20px; margin-top:-7px}

      (The “height” and “margin-top” tags were primarily to make it appear even nicer and centred).

      I hope that this is of a help to anyone else having the search bar be larger than the place they want to put it; this is a fabulous plugin and I don’t want to deprive others of using it if they’re having problems.

      Reply
  • Christine Blythe said:

    Very nice plugin. Your work is so much appreciated after I wasted so much time and frustration trying to figure out Google’s horrible instructions.

    I would specifically like to link the plugin to my adsense account for revenue. Can you please tell me how to do this – or anyone else???

    Thanks very much.

    Reply
    • edwin said:

      Hi Christine,

      Thank you for your comments. The easiest way to link the plugin to your adsense account is to go to the google custom search options at http://www.google.com/cse/manage/all
      At that site, there is a link to “Make Money” where you can link your adsense account to your google custom search engine.

      Hope this helps,

      Edwin

      Reply
  • Dogan said:

    Hi Dude,

    Great work! Keep it up.

    I guess your plugin conflicts with shadowbox js, i’m able to open up a pop-up on my homepage but i’m not on a post page.

    Would you please check it ?

    Reply
  • Dogan said:

    Nope, it aint conflict with any of my plugins i guess.

    But it still show them on homepage as a pop-up, on a post page under the search box.

    Reply
  • Dogan said:

    Oh right,

    I found where i do have the problem, on my post pages im loading a php file which pop-ups if the user is new and says to subscribe follow like bla. bla..

    on that php file i’m loading the latest jquery pack which conflicts with yours.

    This is how i load;

    Do you have any workaround?

    Reply
  • Kristin said:

    Great plugin, but Im having trouble getting the results to display where I want them. Id like the search results to display in a separate page. Ive tried adding the code in my search.php and it doesnt work. If I put the same code in the header file (where the search is located) it works fine. Suggestions?

    Thanks!
    Kristin

    Reply
    • Dogan said:

      Create a Site Search via Google Adsense, not on as linked in the plugin. When you did create a new custom site search at google adsense page, you will receive two different code packs, one is to search and the other to display results. Use the result code as a page. And use the id for the plugin, the id must stard with “pub-” if you created the right custom search.

      Reply
  • John Harris said:

    Hi.

    In FAQ: Q. My current website search box is not in a widget. Can I replace wordpress search with this plugin?

    Yes. You sure can.
    You will need to modify the wordpress theme you are using and replace the wordpress search code with this plugin’s API.

    Could you explain further regarding the plugins API. What do I put in the search code exactly? Is it in search.php I do this?

    Thanks (PS. Loving the plugin)

    Reply
  • david said:

    is there a possibility that can we get only results with specific date. For example only results that sites updated within last month ?

    Reply
  • Harsha - Tech Blogger said:

    Nice plugin, will try on my blog

    Reply
  • maria said:

    I am wondering like david that in this plugin is there filtering option such as date ?

    Reply
    • edwin said:

      Hi Maria and David,

      I’ve been looking to see if there is a way to add filtering options, but can’t seem to find any.
      The search box and searching is handled by Google and I couldn’t find any API to set the filtering options.

      Edwin

      Reply
  • julien said:

    Hi
    Thank you for the great plugin, would you mind checking out my site, there is no action when I click on the search button.
    I tested the search engine on the google custom search configuration page and results are good.
    Display results in same window in unchecked.
    Am I missing a step?
    Thank you

    Reply
    • edwin said:

      Hi Julien,

      I think you might have disabled the plugin as I couldn’t find it on your website. If you like me to look at it, please re-enable the plugin and send me a message.

      thanks,

      Edwin

      Reply
  • Helio Alves said:

    Hi Edwin,

    First of all, thank you very much for this nice plugin. I’d like to know if there’s a way to put the custom google search in French since my website is in french.

    Also, is there a way to place the pop up a little bit down because I have a top menu and when I search with the option to pop up, the pop up is on top of the menu and I can’t close the pop up.

    Thanks

    Reply
    • edwin said:

      Hi Helio Alves,

      Thanks for liking the plugin. The custom google search would use the default language of your web browser. So if your web browser’s default language is set to french, it should show up as french.
      Also I’ve just updated the plugin to version 1.3.3 The problem you hightlighted was observed by another user and he suggested a slight change to the code which should hopefully solve your problem.

      Cheers,
      Edwin

      Reply
      • Helio Alves said:

        Hi Edwin,

        Thank you very much for your reply. The problems I had are now fixed, I’d like to know how I could display the search results in a page instead of the popup. Right now I have a page search.php where I’ve placed this code:
        But whenever I select “Custom” in the widget, when I click “Search” nothing happens, it’s like the button is disable.

        Do you know what could be the problem? Am I doing something wrong?

        Thanks,
        Helio

  • Andrew said:

    Hi, I’m trying to get my client to decide which format of your lovely plugin to use! So at present all three are present (on the ‘Resources’ page)!!
    I played with css to get the formatting better, including bringing the popup over the admin bar; in the ‘in-widget’ presentation, there is only one page of results (is this what a previous correspondent was querying?); however, I get nothing for the in-page variant (even if I take the others out so it’s present on its own … the correct page-file is a template, so it needs a conditional … … is that the problem?
    Keep up the good work!

    Reply
  • Andrew said:

    So, adding the correct tage, the conditional is
    Thanks for any info!

    Reply
  • Andrew said:

    Me again. Sorry about this!
    Please delete the last post as it STILL doesn’t show the code!
    (and edit this one …)

    It seems the in-page version IS working, at least partly, but it seems to need a lot of correction to the styling even of what is shown. It also truncates the results in the same way as the in-widget presentation (the popup is the only one which gives the correct 10 pages +).

    Reply
  • chris Godwin said:

    Hey,nice work on the plugin.
    But i am unable to make it display on my theme page,and i want u to specified likely place i can place it on my theme since i can see from the screenshot i can make it display within my site………here is my site http://www.careershome.com.when i put the option on widget to custom the search button wont work and of-course it wont display anywhere …………..pls i need the respond ASAP.
    thanks

    Reply
  • tayo said:

    i fell in love with your plugin immediately i saw it but
    Please i have the following error on my page after using your plugin:
    error:
    Message: Object doesn’t support this property or method
    Line: 6
    Char: 2
    Code: 0
    URI: http://ewondertv.com/wp-content/plugins/google-custom-search/js/gsc.js?ver=3.2.1

    Please how can i correct it

    Reply
    • edwin said:

      Hi Tayo,

      Could you re-enable the plugin on your site please and also provide instructions on how I can re-create the problem you mentioned in.

      Thanks,

      Edwin

      Reply
  • Tyler said:

    Hi,

    I love the plugin! It is amazing and I love the look of the popup. The problem is I want the popup to match in styling with the rest of the popups on our site.

    I coded the hell out of it, but kept running into issues as everything is really stuck to the search box id. Did you base this upon another lightbox or is there an easy way to integrate it for another popup on the page?

    Thank you so much!
    Tyler

    Reply
  • vk said:

    hi,

    i use your plugin, it work perfectly, but when the search box in the post url, it not working correct. as it suppose to popup the result but now it show within the widget.
    eg.http://ipropertyhelp.com/2011/09/bandar-puteri-klang-r00246/
    please help …

    Reply
  • Jay said:

    Hello Edwin,

    First of all massive thanks for this wonderful plugin! I finally got it to work with the custom display, but my only problem is dat not all words that are on my website can be found… I did the URL-pattern (/*) at the Google configuration site, but some words just can’t be found (and I have only 26 pages). Could you tell me what to do?

    Thanks in advance!

    - Jay

    Reply
  • Jay said:

    I think I found it. For everyone else with the same issue: you need to create a sitemap. A sitemap is an .xml file with urls that can be searched on. It can be made for example at http://www.sitemapsubmit.net/. Create it, upload it on your server and via the google webmaster help services you can upload it (or maybe it is automatically found on the google custom search page). Then it needs to be indexed. This will happen in 24 hours and then the results are visible, right?

    This video also helped me out: http://www.youtube.com/watch?v=oqhU66RP8gQ&feature=relmfu

    Reply
  • Max Attract said:

    Thanks for the information. I have been tweaking my blog and looking for ways to make it better. I have heard that the WP search wasn’t all that, so I appreciate the review on a better option.

    Max Attract
    webmaster, Perfume with Pheromone

    Reply
  • Jonas said:

    Great plugin! Works well; however, I noticed when I have this plugin activated, it adds two blank lines to the top of every page/post. Think it’s because of a trailing blank line after a php close, but haven’t had time to investigate.

    Reply
  • Xuthi said:

    thank you very much

    Reply
  • Maximilianos said:

    Hey Edwin , I’m having a bit of a weird issue with the plugin. I’ve used the code integration, not the widget and selected the POP_UP option. Now the odd part, it works on every one of my pages apart from my post pages..

    Firebug finds the following Error on these pages:

    $(“#dialog”).dialog is not a function
    [Break On This Error] modal: true

    Any ideas in solving this would be greatly appreciated! Otherwise excellent plugin man, really hope to get it working!

    Reply
  • Hans Kuijpers said:

    Hi Edwin,

    thank you for the plugin.
    I have a feature request… I want the results to be shown on an external page.
    Therefor I need to be able to select the option that the results should load in an external page and a new field to enter the URL to that page.

    I’m new to WordPress so I’m not sure how to write WP-extensions. I do know how to alter the code… that’s what I did.
    search-box.php
    added options.enableSearchboxOnly(“”);
    customSearchControl.draw(‘cse-search-form’, options);

    can you add this properly to your extension?

    gr. Hans

    Reply
  • wim said:

    hi, i keep getting a no results page back from the plugin
    no white spaces in my ID

    any idea?

    Reply
  • gezginrocker said:

    when I implement at a template, the search box displayed is too long. how can I modify it with css? I tried “input.gsc-input { width: 50%” as suggested before, but it’s not working.thanks

    Reply
    • Steve said:

      The width parameter is definitely hard to set from what I can see. Have beaten my head against the wall and plenty of blood but no solution. The css fix suggested does not work. HELP! thanks.

      Reply
  • Nilesh said:

    I’m having same problem as wim said…..please help

    Reply
  • HBurke said:

    I notice the the forum links for this plugin are no longer calling posts. Is the plugin still active? Trying to solve a problem where the widget will only display results in the widget itself, regardless of which settings I use.

    Reply
  • geneva said:

    Hi Edwin,

    I have 2 sites that i am searching but the results for only 1 of them shows up.

    One site is mine – outerregion.hackinghistory (the site for which no results are coming up) – and the other is outerregion.ca. Has his happened? I love the way results are showing up (for the other site) just need it to work for mine! Could it be the way I hid my WP search bar in CSS?? Thank you :)

    Reply
  • geneva said:

    Sorry, my site is outerregion.hackinghistory.ca !

    Reply
  • geneva said:

    Hi, thank you for getting back so fast. Time is always short! By the way now I am getting none (results)! I think I am going to pull the plug so to say! and then plug it back in again. Can I do that or do I have a record for both sites that needs to be erased? Do you go into sites with a firebugish thing plugin creators have or something to troublehsoot ever? If not, I do not know what I did, but I do have 2 different passwords somehow! – like the SJKL;NV.KV,NX,CM9994297849878 kind. And does it matter how we iinput the url? www? http..? How should I proceed please if I can just replugin? Thank you :)

    Reply
  • Pingback: Google custom search | Google Enterprise Search | Alan Ferguson | Website design

  • Pingback: Recommended Wordpress Plugins

  • Daniel said:

    Great plugin! I’m familiar with GCS so it was no problem implementing it onto my site.

    One issue, however. My site’s theme uses a lot of z-indexes (pics on top of pics on top of pics). When I use the popup window for search results, the popup doesn’t appear on top of all of the pics on my site. It’s under some and on top of others. I looked through the CSS but I don’t know which style to add a z-index to to fix this.

    Also, if I use the “in widget” option for search results, the width of the results is wider than the widget space on the sidebar. Again, not sure which style to modify here.

    Thanks for the help!!

    Reply
  • Kanti said:

    Hi Edwin,

    Thanks for this great plugin. Have been thrilled since I added it to our site (http://tsr.net.co): it works perfectly! :-)

    One small thing I want to fix and need your advice on how to do it: a tiny cross that’s used for clearing results appears next to the search button and I want to hide it. How can I do it?

    Thanks much in advance.

    Kanti

    Reply
    • Edwin Kwan said:

      Sorry Kanti, that cross is generated by Google and I’m not sure how to go about removing it.

      Reply
    • Dave said:

      Hi Kanti.

      I was looking at your website and I am trying to do the exact same thing in where you have the search input/box/clear button. Mine is currently on the widget bar. I was able to mess with the .css a little and was able to move the input box and the search button, but I can’t seem to get the “x” clear button to move. Could you share how you did it?

      thanks!

      Reply
  • Pingback: Comment search on my site

  • Anand said:

    Just working perfectly on my FB tricks blog. Thanks a lot for sharing :) v :)

    Reply
  • James said:

    Hi Edwin, fabulous plugin Edwin – great work….however on 2 out of 10 webbies where it is installed it will not pop up (although its been selected?), just sticks results under the widget PLUS the top 3 results are google adsense ads whereas on other installs of your plugin (which do pop up) there are no ads shown…strange. Its possibly another plugin but all the sites have the same plugins. I’m creature of habit!!

    Any ideas?

    James

    Reply
    • Edwin Kwan said:

      Hi James,

      Strange indeed. Can you provide me with the links to those two sites which have having the problem please.

      Thanks,

      Edwin

      Reply
      • Per said:

        I think I have same problem and I wonder if its related to which theme we are using. I’m using Twentyeleven. James do you have same theme on all your 10 sites? I have read something around lightbox and z-index which can cause the issue but I’m not 100% sure…

        Per

  • Kita said:

    Hi Edwin Kwan,
    I want to display link (gren text) in bottom results same google, how to do it?

    Thank for great plugin!,

    Kitahi.
    Sr for my english

    Reply
  • Per said:

    Hi,

    I have installed you plugin and I run the latest version of WP. When I choose popup the popup windows first row is coming under the header menu so I can’ see first row and I can’t close popup window. How can this be fixed? I run search in widget now so send me a mail so can I change it and you can look into it then!

    Reagards Per

    Reply
  • Per said:

    Hi Edwin,
    Have tested more and depending where I put you widget popup works if I have it placed further down so I don’t see my menu. So if I choose this option I wonder if it possible to fix so search window will follow scrolling. Can that be fixed?

    I still belive that depending on which theme you have installed popup can be broken in this case if widget is placed in top then popup is coming under menu and that part might be the mentioned z-index issue.

    Please come back asap with a solution for both mentioned issues.

    Best regards Per

    Per

    Reply
  • Pingback: Optimize Google Custom Search for In-Site-Search | Search Engine People | Toronto

  • Opus said:

    Yesterday,I updated to the most recent version of Jetpack for WordPress.org (To get the stats option) and since then the stats don’t work.

    I have desactivated all plugins and reactivated them one by one. Your plugin, Google Custom Search WordPress Plugin, is the one that is in conflict with Jetpack. I would really like to actvate your plugin gain but I need the stats too.

    I had to go back to the standard WordPress search widget but I like yours much better and would love to be able to use it again.Thanks

    Reply
  • Opus said:

    Hi again,
    Below is what somebody from http://wordpress.org/support said about this problem:

    The Google Custom Search plugin needs an update. It is incorrectly enqueuing scripts and stylesheets, which breaks other plugins that may try to use the same scripts.

    Any chance of an update to fix this? Thanks

    Reply
  • Edwin Kwan said:

    Hi Everyone,

    Thank you for your feedback regarding the issues the plugin is having with wordpress 3.4.

    I’ve just got back from vacation so I apologize for not getting back sooner.

    Rest assured, this is being looked into and I hope to have a fix soon.

    Edwin

    Reply
  • Cindi said:

    In case it helps to pin point, I had to deactivate the plug in after update to 3.4 because the drop down boxes for Widgets on the Appearance tab stopped working. Had to deactivate all and the re-activate one by one to get the problem isolated.

    Reply
  • Edwin Kwan said:

    Thanks for everyone’s patience. Version 1.3.4 has been released which addresses the plugin incompatibility with wordpress 3.4

    Reply
  • Opus said:

    Wonderful! All is well, plugin doesn’t interfere with stats anymore and I have the nice search results popup box once again.

    Thanks a lot!

    Reply
  • per said:

    Hi

    Is it possible to fix the layer so popup dont come under header? I have tested to change z-index to 1000 but doesnt help. I have Twentyeleven theme.

    Reply
    • per said:

      Hi again,
      Regarding z-index its working when I change the correct css rule in style.css under #branding.
      :-)

      Reply
      • Edwin Kwan said:

        Hi Per,

        good to hear that it’s working now. can you provide me with the changes that you made so that I can include them in the next release?

        Thanks,

        Edwin

  • Per said:

    Hi
    The change I did was in twentyeleven style.css and under #branding z-index from 9999 to 1000.

    Per

    Reply
  • joe syed said:

    I am trying to figure out how to have the search results displayed on a designated page in my wordpress such as search-form.html. So if the user enters a search result in the search box it redirects them to that page to display the results. If anyone knows how to accomplish this I would greatly appreciate it.

    Reply
  • Dave said:

    Is it possible to remove the “X” clear button next to the search button box?

    Reply
    • 411 New York said:

      How would your visitors clear the dialog box if it is gone? If someone is surfing on a touch screen device, (this will happe more now that Google’s Nexus 7 is coming) you make it harder for them to make a new search because now they have to hold down the ‘backspace’ key to clear out the old search terms.

      Reply
  • aplicaciones gratis said:

    Can i use adsense for seach with this plugin?

    Reply
  • Harry Thomas said:

    I’m using the plugin on http://www.rivercityattractions.com/

    Using the search box brings up the popup dialog box in the center of the page, but scrolling down to bottom of the search box and selecting the next search page shifts the box to the top of the page, hiding the search box header under the button bar. This happens in IE, Firefox, Safari and Chrome. Not sure if it happens on a Mac, but probably does. It also happens on Safari on iPad.

    Pressing the ESC key makes the dialog box disappear, but that’s not always an option (no ESC button on the iPad.) Any suggestions for a fix?

    Reply
  • Attila said:

    I am using the plugin and its great, Is there a way to make the results go to Google Analytics, so we can see what words were searched for on my site, it says you can but i don’t see the search qry string,

    Reply
  • Tristan said:

    Edwin, thank you very much for this plugin – I’m incorporating it in to my site (though I haven’t initiated an index yet as I’m not finished) but was wondering if there is the capability to decide whether or not to display the search button on a “per page” basis?

    Eg in a widget I don’t want to display it, but on my 404 page (which won’t be used often I hope!) I would like to show it.

    Is this possible?

    Thanks again.

    Reply
    • Edwin Kwan said:

      Hi Tristan,

      Try the following.

      < ?php display_search_box($display_results_option); ?>

      where $display_results_option is one of the following three options.

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

      Below is an example.

      < ?php display_search_box(DISPLAY_RESULTS_AS_POP_UP); ?>

      Reply
      • Tristan said:

        Thanks Edwin, I didn’t explain myself very well.

        I understand how to make the search “box” appear where I want it to. The behaviour I want to change is the display of the actual search “button” that appears to the right of the input area. I have set it hidden in the tickbox, as in a widget I don’t want the button. But on a “page” I have the room to display it.

        Does that make sense?

  • baljit said:

    i want to show result on other page . how it possible

    Reply
  • Vernard Mercader said:

    I had to disable temporarily the Plugin, as of (Sept. 21, 2012) the plugin is causing some JS problems with Events Calendar plugin, and the Google Maps attachment turns to a green box. When I disable Google Custom Search, the Box returns normal and shows the map again.

    Hopefully this bug report helps! (more power to you).

    Reply
  • Will Nesbitt said:

    Does the plugin include a shortcode to allow placement on a page rather than as a widget?

    Reply
    • Edwin Kwan said:

      Sorry Will, there’s no shortcode for that. But you can choose to add the PHP code snippet in there if you like. Details are in thee Advanced Configuration section of this page.

      Reply
    • Oliver said:

      @ Will

      You can actually use shortcode like so:

      just add this line to functions.php: // add_shortcode(‘wpbsearch’, ‘display_search_box’); //
      (without the //) and then use the shortcode: [wpbsearch]

      Hope this helps.

      Reply
  • Ido Doron said:

    Hi, it doesn’t work for me…
    I have placed the plugin’s widget, then set it to show the results “Elsewhere”.

    After that, I have placed the following code inside my theme’s search result page (search.php) so instead of showing the usual results, it shows Google’s: .

    Unfortunately, the plugin’s search form does show search results. It gets stuck and nothing happens…

    I think it might happen because the results code is place on a different page. Is there any way to make it work?

    Reply
    • Edwin Kwan said:

      Hi Ido,

      You’re spot on with identifying the problem. The results display code snippet needs to be in the same page as the search box. That’s how it works for this plugin.

      Reply
  • john said:

    hi admin

    thanks for great plugin, i love it so much

    but when installed with popup results options
    its show the blank space before the results space

    please see this

    http://www.mediafire.com/view/?7hw659lrjor6uzd

    i try on firefox lastest and get this error

    i tried fix but i can’t
    please help me, thanks admin

    the plugin work good on IE and Google Chrome

    Reply
  • Akin said:

    Awesome plugin! Worked like a charm. This is one of the first plugin I’ve installed without any conflict(s). Almost scary. Keep up the great work!

    Reply
  • tRavIs said:

    Is it possible to change the classes of the form generated? (see code below)

    Basically I want to update them to use the classes already defined in my templates css.
    I would prefer to do this rather than updating gsc.css

     

    powered by
    </td

    Reply
  • Jim said:

    Hi,
    Thanks for the great plugin! All is working well, except I would like to change the style of the font on the results page. On my site it looks kind of messy and blurry. Is there any way I could get it changed to kind of suit my site? Sorry Im a website noob so be gentle!

    Cheers

    Reply
  • Mehmet said:

    Thank you very much for this handy plugin! The only weird thing that I got is the changing web site title. My web site is http://www.yadicemil.com
    The title of the web site is “Yâd-? Cemîl Resmî Sitesi”

    The number “4864″ was added to the web site title when I activate the plugin: “Yâd-? Cemîl Resmî Sitesi 4864″

    When I deactivate the plugin it becomes original and that number disappears. I would be grateful I you can help to remove that number from the web site title?

    Reply
  • raha said:

    Hi,
    I have installed the Version 1.3.4 but sill issues with pop-up box display on firefox and opera.

    cu raha

    Reply
  • Attila said:

    Hello
    You created me a Google search for my termate website, since updating to the new version of word press the Google Search box has took the whole blue bar? before it was only like 2 inches long,
    Any thoughts how I can get this to be small again?

    thank you

    Reply
  • simco said:

    First, thanks for the plugin. It’s hopefully what we’re looking for.

    Edwin, please bear with me a sec as i’m really fuzzy on this way of displaying the results ‘in a page’. If i’m understanding the plugin correctly from viewing your screenshot showing ‘in the page’ results, it would appear to me that the results are showing up in a ‘clean page’. In other words, say i’m on a post and I see the search box (widget) in the sidebar, type in a search. According to your instructions the search results tag needs to be in the ‘same page’ as the ‘search box’ (the widget, i’m assuming). Well, in WordPress, the posts are all using the single.php file. So when I insert the results tag into the single.php file I get both the results AND the post (shoved underneath the results).

    What me, and many others i’ve found in various help centers, are looking for is to have the widget present throughout the site and when a search is performed the results display in the content area of that page and the sidebar still present. Just like your screenshot #1 in your descriptions. Exactly how do we do that? Is there a loop we have to write? Not sure how to get just results on a page unless we create a specific page for both the search box AND the results which defeats the purpose of having the widget.

    I don’t see how creating a specific search page to display the search form and results is of any benefit. I figured the way this worked is the widget performed the search and had a page it would display the results on or would determine that what IS to be displayed are the search results only.

    In a nutshell, HOW would be utilize the widget and have the results displayed in the content area no matter what page they are on?

    Also, just a quick note, there’s nowhere in the version of your plugin that i’m using that states the results be put “Elsewhere”. The drop down in the widget says ‘In the widget’ or ‘In a popup’ or ‘Custom(see instructions…).

    Reply
  • Michael said:

    Hi,

    Thanks for the awesome plugin. I’d appreciate your help to modify the search button, please see: http://www.rhinoplastyclinicsydney.com.au/blog
    Thank you very much.

    Reply
  • David said:

    I too cannot figure out how to alter the CSS to fix the width, the tip given to Noel’s question on July 6, 2011, doesn’t seem to work for me either.

    But, to give some helpful feedback on what I’ve discovered and configurations:

    I’m using the Suffusion theme with wordpress, and am trying to put it on the Right Header widget area (where the search bar is currently, until I can get this one to work, I put the old one back). I noticed that if I put it in other areas, like in the header under the Facebook/Twitter/Donate buttons, it sticks to the small area that it’s suposed to without me even needing to alter the width in the CSS, but when it’s in the Right (or Left) Header area, it takes up the whole area and positions above the dropdown menu because it’s so big.

    I hope that the issue can be fixed, as I really like this plugin, it’s better than what I got now (love having the results page come up on an overlay window), but not being able to get the size to work means I can’t use it for now, which means I can’t use the awesome. :(

    Reply
  • Pingback: Multiple Google Custom Search Engines on One Site | Question and Answer

  • Pingback: Zoeken op Manssen.nl is gewijzigd! Zoek nu via Google Aangepast zoeken « Manssen.nl ~ Vanaf de zijlijn

  • mano said:

    Hi Edwin,

    I have installed this plugin on WordPress 3.5.1, and configured it.
    But it is not working, Widgets display settings is “Within Widget”.
    It showing “No Results” after clicking on search button.

    Please help.

    Thanks

    Reply
  • Matt Minde said:

    Howdy! Really good plug-in, except our ISP tells us it’s returning the following notification literally thousands of times:

    statistics/logs/error_log:[Fri Jun 21 10:49:07 2013] [error] [client 69.11.240.99] Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: /var/www/vhosts/ysnews.com/httpdocs/index.pl

    It may be because of some default permissions the plug-in is asking for that our ISP doesn’t allow. At any rate, it’s not affecting the functionality, but it is bothering our host with these immense log files. Any insight into this would be greatly appreciated. BTW, I tried the forums first, and unfortunately, they are riddled with spam, and as such make it almost impossible to find anything relevant. THANKS! —MM

    Reply
    • Edwin Kwan said:

      Hi Matt,

      Could you double check to see if the plugin is causing the error? Is there a line number in the error to point to where in the code the error is generated from?
      Will be good to fix it if it is a problem.

      Thanks,

      Edwin

      Reply
  • Sarah said:

    Greetings! Is there a way to remove the text and logo in the search box that shows “Google Custom Search”?
    Thanks!

    Reply
  • Denis said:

    Hello Edwin,

    Today I installed this plugin, definitely a great job done.

    I want to use this search within my blog posts with default title as a search option, to provide users more content regarding subject.

    Please help me, Thanks in advance!

    Reply
  • Acupuncturist said:

    I seem to have a problem with this http://sandbox.vitalis.co.nz/?s=ivf will return the right results, but within the search results everything liks to that same search page http://sandbox.vitalis.co.nz/?s=ivf.

    Is this a bug? Or am I doing something wrong?

    Reply
  • Musica.at said:

    Perfect working! Thx!!

    Reply
  • Wrenna said:

    Hi – I just installed it and searched for a word on the site “caveat”
    It should come up but I am faced with No Results!
    Why isnt it working?
    I configured it to search the entire site

    Reply
  • Osnilton said:

    Hello!
    I pasted the code –> display_gsc_results();
    replacing the code –> get_search_form();
    and then is stops working.
    I´m trying to display this plugin inside the main menu. And with get_search_form(); it works, but after replacing is desapears.
    Am I doing it wrong? Do I need to customize the php or css code here?
    Thank you

    Reply
  • R Harris said:

    The plugin works well, but there is a problem using the popup window as it lies “behind” the site title and menu bar, if they are on the screen. I prefer the popup window to the in-page display, as the window doesn’t have Google ads. I have tried a few browsers, they all seem to be the same. I have found some previous queries about this issue, but not an answer.

    You can see my implementation at
    http://britishbricksoc.co.uk/?page_id=35 (pop-up window)
    http://britishbricksoc.co.uk/?page_id=320 (in-page)

    Reply
    • tokazama said:

      I am having the same problem. My pop-up window appears behind items on the page. This happened after updated to the latest WP.

      Reply
    • tokazama said:

      I figured it out by editing the css on my site (using “Custom CSS”)

      .ui-dialog {
      z-index: 1000;
      }

      Reply
      • amanda said:

        tokanzama hey! I have the same problem as you did but I still can’t figure out how to solve it. Could you explain how you did it or maybe send me a link to a page that explains it? I’m losing it here!!

        Thaks a lot!!

  • thony said:

    hi . can u tell me how to scan all my products in google custom search because everytime i search for my product in gcs its always display no result. i didn’t launch yet my website coz im still working in search form thats why i install gcs. thats my only problem. im hope you can help me..

    tnx in advance.

    Reply
  • pdacruz300 said:

    Hi,
    I’ve recently installed Google Custom Searc Plugin for WordPress in my wordpress site. How can I have it replace wordpress’s search by removing the wordpress search and putting this plugin instead?

    Theme: AVADA
    WP version: 3.8

    Reply
  • anthony said:

    hi, can you tell me how to put the search history using the code.. im trying to put it in my popular search section..

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>