Jump to content
Sign in to follow this  
cfisher

Add Google Custom Search

Recommended Posts

cfisher

I'd like to add Google Custom Search as a search option to the search results page when using the build in search finds no results ("Nothing Found" notice). I cannot see to find which page this occurs on. Can you help?

Share this post


Link to post
Share on other sites
cmunns

Sorry, could you remind me what theme you are using again? If it's WhiteHousePro you'll need to modify the _searchform.php in the library folder.

Share this post


Link to post
Share on other sites
cfisher

Yes, sorry, WHP. I'll check out the file you mentioned. Thanks!

Share this post


Link to post
Share on other sites
cfisher

This is the entire content of the _searchform.php:

	<form method="get" id="searchform" class="" action="<?php bloginfo('url'); ?>/">
		<fieldset>
			<input type="text" value="<?php _e('Search',TDOMAIN);?>" name="s" id="s" onfocus="if (this.value == '<?php _e('Search',TDOMAIN);?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e('Search',TDOMAIN);?>';}" />
			<input type="image" value="Go" src="<?php echo THEME_IMAGES;?>/search-btn.png" class="submit btn" />
		</fieldset>
	</form>
	

Would I just insert the Google custom search info after this code? I only want it appear on the page when there is no hits in a search.

Share this post


Link to post
Share on other sites
bryan-hadaway

I'm unable to find anywhere better than: _searchform.php at the moment. Thanks, Bryan

Share this post


Link to post
Share on other sites
terpys

SO if I am running the Pagelines Platform Grandchild theme... how would I go about modifying the standard search box to be a Google Custom Search box?

Share this post


Link to post
Share on other sites
catrina

If you already have the Google Custom Search box code, you can add it to the searchform.php file.


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×