Blog Help

  Homes arrow Blog Help arrow Page 3 - Add Google Custom Search to WordPress Blogs
 Webmaster Tools
Base64 Encoding 
Browser Settings 
CSS Coder 
CSS Navigation Menu 
Datetime Converter 
DHTML Tooltip 
Dig Utility 
DNS Utility 
Dropdown Menu 
Fetch Content 
Fetch Header 
Floating Layer 
htaccess Generator 
HTML Encoder 
HTML Entities 
IP Convert 
Meta Tags 
Password Encryption
Password Strength
Pattern Extractor 
Ping Utility 
Pop-Up Window 
Regex Extractor 
Regex Match 
Scrollbar Color 
Source Viewer 
Syntax Highlighting 
URL Encoding 
Web Safe Colors 
Forums Sitemap 
Weekly Newsletter
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Contact Us 
Site Map 
Privacy Policy 
  >>> SIGN UP!  
  Lost Password? 

Add Google Custom Search to WordPress Blogs
By: Codex-M
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 8

    Table of Contents:
  • Add Google Custom Search to WordPress Blogs
  • Configuring Custom Search Using Your Google AdSense Account
  • Integrate Custom Search into Your Blog
  • Excluding the Google Custom Search Result Page in WordPress Navigation

  • Rate this Article: Poor Best 
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article




    Add Google Custom Search to WordPress Blogs - Integrate Custom Search into Your Blog

    (Page 3 of 4 )

    Now that the custom search for your own blog has been completely configured in your Google AdSense account, it is time to add it to your blog. Follow the important procedures below:

    Step 1: Log in to your WordPress blog admin panel.

    Step 2: Go to "Pages" "Add new."

    Step 3: In the page title, use exactly the path you used in your custom search configuration. The example path in my blog is:, so in the page title, I enter:


    Step 4: Copy and paste the code provided by Google Custom Search. The code should look like the snippet below:

    <div id="cse-search-results"></div>

    <script type="text/javascript">

      var googleSearchIframeName = "cse-search-results";

      var googleSearchFormName = "cse-search-box";

      var googleSearchFrameWidth = 600;

      var googleSearchDomain = "";

      var googleSearchPath = "/cse";


    <script type="text/javascript" src="

    Step 5: Under "Discussion," which is below "Custom fields," uncheck "Allow Comments" and "Allow trackbacks and pingbacks on this page."

    Step 6: When all are set, click "Publish."

    Step 7: You will need to replace your default WordPress search form with Google Custom Search code. In your template, look for the default WordPress default search, and entirely replace it with the custom search code form, which looks like this:

    <div id="searchbar">

    <form action="" id="cse-search-box">


    <input type="hidden" name="cx" value="partner-pub-589878452542:iuio9-wpop" />

    <input type="hidden" name="cof" value="FORID:11" />

    <input type="hidden" name="ie" value="ISO-8859-1" />

    <input type="text" name="q" size="31" />

    <input type="submit" name="sa" value="Search" />



    <script type="text/javascript" src=";lang=en"></script>



    Below is a screen shot that shows you what you should see after following the above procedures:

    You will notice that this newly created page for search results is also included in the "Pages" WordPress navigation menu. This is not advisable, and you need to exclude it.

    More Blog Help Articles
    More By Codex-M



    - Blogging to Attract Holiday Shoppers
    - Commit to Your Blog, or Don`t Blog
    - Should You Blog on Google Plus?
    - Fast Blog Post Ideas
    - Organize Your Business Blogging
    - Too Busy to Blog?
    - The Value of a Business Blog
    - WordPress CMS Tips: Removing RSS Feeds
    - Add Google Custom Search to WordPress Blogs
    - Start Blogging with Blogger
    - Bloggers and the Associated Press: the Past ...
    - WordPress Vs. Blogger: Which Should You Choo...
    - Can You Make Money with a Free Blog?
    - A Beginner`s Guide to Self Hosting Your Blog
    - No Blog Stands Alone: Why You Need Affiliates

    Developer Shed Affiliates


    © 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap