How can I integrate Google Search in my template's default search bar?


#1

Assalam-O-Alaikum!!!

I have got the code of google custom search bar and I have placed it in sidebar but I also want it to be integrated in my template’s default search bar.I have encircled the area (search bar) with red in image where i want to integrate google custom search code .My blogger Link: (http://technologyhunterzz.blogspot.com/)

Please Help Me.Waiting for reply
Image Link :
. (http://1.bp.blogspot.com/-od2fMwOOx5U/VVtIdkOPYMI/AAAAAAAAB-I/hkHWMY1F_fc/s1600/search%2Bbar.PNG)


#2

Dear, i don’t think this can be done because Google Search Engine provide the JavaScript that process whole search box. Yes, you can customize that search box but it is impossible to integrate that to any other Search Box. You can surely replace that whole search box with Google Search Box so that when a visitor click on Search icon, a Google Search Box will display instead of default search box.

-Shivansh Verma


#3

Waiting for reply of Mohammad Mustafa Ahmedzai.


#4

@Shivansh So as i have also put google search bar so when i search in template’s default search box, so a google search result pop-up appears along with a search result in my blog’s page.So how can i disable the search to be shown in my blog’s page.


#5

Can you elaborate what you wanna say? I am unable to understand… :frowning:


#6

@Shivansh When I search through template’s default search bar , google search pop-up appears along with search result displayed at the body of my blog. So i want to disable the search result that is displayed at body of the blog.


#7

But when I clicked on your template’s default search box, nothing happened.


#8

@Shivansh When I search through my template’s default serach box , Search result is displayed at my blog like this : (http://3.bp.blogspot.com/-yHqj-0RtWb4/VVtVSBUjpJI/AAAAAAAAB-Y/lKAF3kNFvRI/s1600/cvcvcvcv.PNG) and along with it a search pop-up appears too like this: (http://1.bp.blogspot.com/-0GmlpwF1xcI/VVtVSbZSUiI/AAAAAAAAB-c/r9tivHS4yIk/s1600/ghjgjgj.PNG). So I want to disable the search result to be displyed in my blog body.


#9

You can solve this by adding using following conditional tags:

<b:if cond='data:blog.pageType == &quot;static_page&quot;'>
GOOGLE SEARCH ENGINE CODE HERE
</b:if>
<b:if cond='data:blog.pageType == &quot;item&quot;'>
GOOGLE SEARCH ENGINE CODE HERE      
</b:if>
<b:if cond='data:blog.url == data:blog.homepageUrl'>
GOOGLE SEARCH ENGINE CODE HERE
</b:if>

This will remove the Google Search Engine from Archive pages. Let me know if this worked. :smile:


#10

@Shivansh Where I have to put this code?


#11

before i think /head but it is my thinking wait for his reply


#12

You have to replace Google Search Engine code in your sidebar with this code. Just replace GOOGLE SEARCH ENGINE CODE HERE with your Google Search engine code.


#13

Nafees Originally said :

Wish Website Designing could be as easy as designing a Image, Duh!


#14

Simply go to CSE and select different layout. :smiley:


#15

Please help @Mohammad . Is there any way to integrate google custom search engine into my template’s default search bar???