Replace Wordpress Search with Google Custom Search
Let’s face it, Wordpress Search is gruelingly slow. It’s so slow; in fact, that I built a form to add your own blog to Firefox’s list of allowable searches.
Thankfully, Google is blazing fast. In addition, Google Adsense’s Google Custom Search has evolved to be embedded into your own blog (or web site). Geekish has done a fantastic job in detailing the steps to embed Google Custom Search into your Wordpress blog. The directions are flawless!
Permalinks and Google Custom Search
For a site with permalinks like mine, I did have to make one additional modification, though. I had to make the action in the form tag relative rather than supplying the entire URL with domain. If I didn’t do this, I would get a strange url concatenation (could be some other issue with my blog!).
<form action="/google/"...
Make a Search Result Page Template
Rather than hacking up your theme or messing with embedded Javascript in your page content, I’d also recommend building a template for the Google Custom Search Results Page. To do this, simply build a page that’s structured like your Single Page theme page. Gut all the chunks you don’t need and insert the Google code. Mine looks like:
<?php /*
Template Name: Google Custom Search Results
*/ ?>
<?php get_header(); ?>
<div id="content">
<div class="post">
<h3>Search Results:</h3>
[ Insert your Google Custom Search Results Code Here}
</div>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Now, when you add a new page for your results, select this as the template:

I wouldn’t hesitate at doing this to any blog – not just for the blazing improvement in speed but also for the relevant results. You may even make a couple bucks on the side as well! Take a look for yourself and give my new Search form for a spin! You won’t be disappointed!