• The guy was to lazy to describe the installation process (there’s no “iframe option” for example on the Google site) – why do you think he was not lazy writting the plugin?

    Lot of unpredictable behavior, alerts and it simple does not work.

    Let’s try in 40’th line of code:

    self::$google_search_box = preg_replace(‘/size=”31″/is’, ‘id=”s” value=”‘.$q.'” ‘, self::$google_search_box);

    It is needless to say there’s no any magic “31” digits in the google_search_box, so all the code is broken.

Viewing 9 replies - 1 through 9 (of 9 total)
  • I successfully implemented this last winter. Since then, Google’s deprecated the iframe option. I discovered this when trying to add it to a new site I’m building – you’re not even given the iframe option anymore.

    I’ll need to find something else for both sites. This worked quite well up until now, though.

    Okay, I got this to work again. I’ll write the author shortly.

    In the meantime, if you’d like to use this, do as the author says here:

    http://aleembawany.com/projects/wordpress/google-custom-search-plugin/

    As there’s no longer an iframe option, though, choose “results only” for the layout. I chose “minimalist” for the style, but it probably doesn’t matter. Click “save and get code”.

    Once you’ve enabled the plugin in your WordPress installation, paste that code into the second box on the config page (the search results one).

    So, that takes care of how to display the search results. But you’ll need a search box too. For that, I found this page on Google’s site:

    http://www.google.com/support/customsearch/bin/answer.py?answer=1728572

    I used that code, but had to get rid of the last line – it was showing the “Google custom search” image below the search box, not inside. As the page says, find and fill in your search engine ID. Paste the code into the first box of the WordPress plugin config page, and you’re done! Save and go to your site to test.

    Hi Flammable thanks for finding that solution and it works for me—until it comes time to add teh actual search box to the site. How did you do this? When I added the standard WordPress search widget to the sidebar and tested it, it did not pick up the GCS but isntead took me to a page with the GCS box which seemed a bit redundant.

    Looks like I’m not using the widgets at all. Instead, I’ve got a child theme (based off of Twenty Ten), and this code is in header.php:

    <!-- Search Box Begin-->
        <div class="header-search">
          <?php get_search_form(); ?>    </div>
    <!-- Search Box End -->

    I’ve got this in my style.css too:

    /* Searchbox Style */
    .header-search {
     height: 30px;
     clear: right;
     float: right;
     margin: 6px 0 18px 0;
     width: 220px;
    }
    .search-text {
     float: left;
     display: block;
     height:20px;
     width:160px;
    }

    Hope this helps! I wrote the author last November but never heard anything.

    Thanks I will play around with that and see if I can get it to work for me.

    foshdafosh

    (@foshdafosh)

    Hello there,

    I’ve tried your solution flammable, but I’ve got the same issue as you vwz1.
    I’m new to this, so I’m just using a tweaked version of the twentyeleven theme.

    I don’t you managed to sort out the problem did you?

    Ta muchly,
    Pete

    flammable

    (@flammable)

    foshdafosh, did you use the code in both of my posts? I just checked, and the search box is still functional on my sites.

    I’m not sure if it matters, but I’m still using the Twenty Ten theme, not Twenty Eleven.

    vwz1

    (@vwz1)

    Hi Pete

    I never sorted the problem. I am looking for anotehr way of adding GCS to the site.

    flammable

    (@flammable)

    Hey guys.

    I need to implement this on another site this week – I’ll write up a proper how-to.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Don't waste your time’ is closed to new replies.