Want to add a google custom search engine at the navigation bar.
-
Hi friends!
How can I add a Google custom search engine to replace the original search box from graphene, at the navigation bar?
I dont need to replace it, I can disable it via options and then insert the google cse in that place via widgets or whatever. (just want to do the easiest way lol).
Thank you!
Mod
Yes, the easiest way is to disable the theme’s built in search box, and then add the Google one via an action hook widget area.
Mod
header.php >> graphene_top_bar
By default, it will appear toward the left; you’ll need to add
float:right
to that widget’s css to get it to the right.YES! Im done, and so proud of myself! 😀
I could put the Google CSE replacing the original search bar, and better, I used the pretty submit button from the graphene theme, replacing the ugly “search” button from Google CSE 😀
I simply changed the code on searchform.php, adding my Google CSE generated code, and then erasing the “input type submit”, replacing for “button type submit”! 😀
If anyone wants to do that, I can help.
Thanks for everything!
Thiago
Keep in mind that editing theme files is not a good idea. Any changes you made will be overridden when the theme gets an update next time. So consider using a child theme.
Marking thread as resolved. You can do this yourself as well.
Mod
Sorry, I didn’t notice that you said navigation bar. I believe there are action hook widget areas there as well. You do not want to edit theme files, as Prasanna said.
@vaeryl, could you be so kind and paste the code for what you had done here? I try to the same thing myself, but calling what have I done “an fail” would be an exaggeration. And would insult other failures in the world.
Can you submit the code here, pretty please?
Viewing 10 posts - 1 through 10 (of 10 total)
- You must be logged in to reply to this topic.