How to Add Google Search in Top of Post and Page in Atahualpa Theme of WordPress

If you want to add the Google Search in each of post or page of Atahualpa theme of WordPress, then this modification is for you! By using this modification, your visitor will have the ability to search any information from your blog to Google, and the search result will be displayed in a new window of your browser.

  1. Open your wp-content/themes/atahualpa/header.php file, and find this code:

    99
    
    		<td id="middle">

    then after that line, please insert this following code:

    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    
    <div class="widget">
    <?php 
    $my_domain = "visualbasicindonesia.com";  // <-- put your domain here!
    $text_color = "000000";
    $results_bg = "FFFFFF";
    $header_bg = "FFFFFF";
    $border = "336699";
    $logo_height = "50";
    $logo_width = "313";
    $my_logo = site_url()."/wp-content/themes/atahualpa/images/google.gif"; 
    $my_logo_link = site_url()."/wp-content/themes/atahualpa/images/yourlogo.jpg";                   
    $visited_link = "663399";
    $title_color = "0000FF";
    $url_color = "008000";
    $faint_color = "0000FF";
    /************************************************************************/
    /************************************************************************/
    /*                   DO NOT EDIT BELOW HERE                             */
    /************************************************************************/
    /************************************************************************/
    // show the content of the block
    $content .= "<!-- SiteSearch Google -->
    <form method=GET action='http://www.google.com/custom' target=_blank>
    <center><a href='http://www.google.com/'><img src='".$my_logo."'
    border='0' alt='Google'></a>
    <input type=hidden name=domains value='".$my_domain."'><input type=text name=q size=15 maxlength=255 value=''>&nbsp;
    <input type=submit name=sa value='Search'></center>
    <center><font size=-1><input type=radio name=sitesearch value='' checked>Web
    <input type=radio name=sitesearch value='".$my_domain."'>www.".$my_domain."</center></font>
    <input type=hidden name=client value='pub-4127448471140412'>
    <input type=hidden name=forid value='1'>
    <input type=hidden name=ie value='ISO-8859-1'>
    <input type=hidden name=oe value='ISO-8859-1'>
    <input type=hidden name=cof value='GALT:#".$url_color.";GL:1;DIV:#".$border.";VLC:".$visited_link.";AH:center;BGC:".$results_bg.";LBGC:".$header_bg.";ALC:".$title_color.";LC:".$title_color.";T:".$text_color.";GFNT:".$faint_color.";GIMP:".$faint_color.";LH:".$logo_height.";LW:".$logo_width.";L:".$my_logo.";S:".$my_logo_link.";FORID:1;'>
    <input type=hidden name=hl value='en'>
    </form>
    <!-- Sitesearch  Google -->
    ";
    echo $content;
    ?>
    </div>
  2. , then put this file in your /wp-content/themes/atahualpa/images/ sub directory.
Share

230 viewsPrint This Post Print This Post

Speak Your Mind

*


*