Want to add a google custom search engine at the navigation bar.

  • vaeryl

    #8018

    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

    Kenneth John Odle

    #40092

    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.

    vaeryl

    #40093

    Ok, but I didnt find the action hook to put it there. Can you tell me the name of this action hook?

    Mod

    Kenneth John Odle

    #40094

    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.

    vaeryl

    #40095

    Its not the top bar. Top_bar is where the RSS and social media buttons are located.

    vaeryl

    #40096

    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

    Prasanna SP

    #40097

    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.

    sanuja.com

    #40098

    Try this, but I explain this using a child theme…

    Integrating Google Custom Search

    Hope it helps.

    Mod

    Kenneth John Odle

    #40099

    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.

    GamingYeti

    #40100

    @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.