In this tutorial I will teach you on how to add Google search in your Thesis theme. Be sure you have “Thesis OpenHook” plugin. If you don’t have you can still use the custom file editor that came with Thesis theme.
You need to have a Google account in order to use Google search. If you have existing accounts please follow this steps to get the code from Google search.
- Open http://www.google.com/cse/.
- Click “Create a Custom Search Engine”.
- Login using your Google Account.
- In the “Set up your search engine” enter all the necessary information and click next.
- Click next on “Try it out” page after you try your search engine.
- Click “Look and feel” and select “Iframe”.
- Click Get code.
- Create a page (not post) in your WordPress site and name it “search”.
After you save your page the URL should look like this:
Now, copy this URL and paste it on “Specify the url in your site where you want the search results to appear:” in Google Custom Search.
Here’s the screenshot of my own Google CSE.
We have two important codes here to integrate in our website. The Search box code and the Search results code.
- Copy the code under the “Search box code” on your site. You can select to appear it on your sidebar.
- Open the Thesis OpenHook under Appearance on your WordPress Dashboard and look for “Post Box Top”.
Paste the code from Google CSE under “Search results code” in “Post Box Top”.
You will then see a similar screenshot below:
When you search on your site the result will appear on the content of your website.