Skip to content

Instantly share code, notes, and snippets.

@pdxmph
Created November 27, 2012 18:48
Show Gist options
  • Save pdxmph/4156186 to your computer and use it in GitHub Desktop.
Save pdxmph/4156186 to your computer and use it in GitHub Desktop.
Fix broken Google Search box
<!-- in WordPress: Appearance -> Editor -> page.php -->
<form action="http://www.google.com/cse" id="cse-search-box">
<div>
<input type="hidden" name="cx" value="017884045025332504017:9pk9oihqlsu" />
<input type="hidden" name="ie" value="UTF-8" />
<input type="text" name="q" class="gsc-input" size="31" />
<input type="submit" name="sa" class="searchbtn" value="Search" />
</div>
</form>
<script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&lang=en"></script>
</div>
<!-- more specifically, this:
<input type="text" name="" class="gsc-input" size="31" />
has to become this:
<input type="text" name="q" class="gsc-input" size="31" />
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment