How to Install Google cse into wordpress Blog

google-custom-search-engine is better than the wordpress search itself,and more you can make a little money of it perhaps.How to install goole cse into wordpress blog?here feilong write down the easiest steps.The post url is edited by feilong on May 17th 2010

First Step.creat new template.

1.paste the code below

Template Name: cse
<?php get_header(); ?>
<!–feilong tips,
here you place your google cse code.then seach the line:

next add code as below:

var match =[^&]*)(&|$)/);
if(match && match[1]){
var search = decodeURIComponent(match[1]);
}, true);

<?php get_footer(); ?> the file as mycse.php.And upload it under your theme.

Second Step.Creat new page.

1.the title:whatever as you like
2.the post slug:search html editor,input code below,
<div id=”cse”> loading….</div> the cse template you created at the first step.
5.publish the eaxmple,

Three Step.change the searchform.php the theme template searchform.php
2.clear the old code,or keep it temporary
2.add html code as below,
<form action=”/search”  id=”searchbox”>
<input type=”text” name=”q” id=”input_search” />
<input type=”submit” value=”Search” />

Last Step.test and enjoy!

Chinge edition:


电子邮件地址不会被公开。 必填项已用*标注