• I am running WordPress 3.2.1. with a modified Twenty Eleven 1.2 theme.

    Here is an example:

    https://www.whatisacdaccount.net

    How do I replace the search bar on the top right with Google’s search bar (Adsense)? Here is the code I need to insert:

    <form action="https://www.google.fr" id="cse-search-box">
      <div>
        <input type="hidden" name="cx" value="partner-pub-1505085520304630:7914894817" />
        <input type="hidden" name="ie" value="UTF-8" />
        <input type="text" name="q" size="16" />
        <input type="submit" name="sa" value="Rechercher" />
      </div>
    </form>
    
    <script type="text/javascript" src="https://www.google.fr/coop/cse/brand?form=cse-search-box&lang=fr"></script>

    Any help appreciated, thanks!

Viewing 1 replies (of 1 total)
  • in your header.php file, search for this code

    <form method="get" id="searchform" action="https://www.whatisacdaccount.net/">
    		<label for="s" class="assistive-text">Search</label>
    		<input type="text" class="field" name="s" id="s" placeholder="Search" />
    		<input type="submit" class="submit" name="submit" id="searchsubmit" value="Search" />
    	</form>

    and replace it with the code from google

Viewing 1 replies (of 1 total)
  • The topic ‘How do I replace WordPress search bar with Google search bar?’ is closed to new replies.