How to Create a SERP

How to Create a Search Engine Results Page

If you want to use Google Site Search, you’ll need to create a search engine results page.


Use your one-column template to create a new page.

Copy the following code to the content area source code.

<h1 id=”serp_title”>Search Results</h1>

<div id=”cse” style=”width: 100%;”>Loading</div>

<script src=”” type=”text/javascript”></script>

<script type=”text/javascript”>

function parseQueryFromUrl () {

var queryParamName = “q”;

var search =;

var parts = search.split(‘&’);

for (var i = 0; i < parts.length; i++) {

var keyvaluepair = parts[i].split(‘=’);

if (decodeURIComponent(keyvaluepair[0]) == queryParamName) {

return decodeURIComponent(keyvaluepair[1].replace(/+/g, ‘ ‘));



return ”;


google.load(‘search’, ‘1’, {language : ‘en’});

google.setOnLoadCallback(function() {

var cxParam = unescape(gup(“cx”));

if (cxParam == “”)

cxParam = “001779225245372747843:mdsmtl_vi1a”;

var customSearchControl = new;


var options = new;


customSearchControl.draw(‘cse’, options);

var queryFromUrl = parseQueryFromUrl();

if (queryFromUrl) {



}, true);


<link rel=”stylesheet” href=”” type=”text/css” />

Save this page with the filename “serp.html.” at the root folder of your website.



Submit a Comment