How can I get google custom search to show at the top or in the menu

I have recently installed google custom search and it works ok so far. The problem I am having is I would want to show it in the menu or top section of my site, but the widgets area does not provide a option, only for right, left, and footer.

I would really love to get in to work at the top of the site as it is more functional there.

  • Predrag Dubajic
    • Support

    Hey @gregory,

    Ok, no problem :slight_smile:

    Note, you can also create child theme so you are safe when it comes to theme update.
    What you want to change is header.php which is usually located in theme root folder.

    In that file search for <nav> tag and right after the closing </nav> tag add this code to call the widget there:
    <?php the_widget( 'CGS_Widget' ); ?>

    Save the changes and that should be it.

    Let me know if you need more help with this.

    Best regards,
    Predrag

  • Azurite
    • Site Builder, Child of Zeus

    Hi there,
    I found this through a search of the forums... glad to know I'm not the only one basically wanting to replace the default WordPress search with the one from this plugin.

    I tried Predrag's suggestion above, but it makes a very long search box right under the navigation menu. Methinks the code should actually still be within the NAV tags, but I'm not sure where, specifically. I'm using a child theme of Twenty Eleven.

  • Milan
    • WordPress Wizard

    Hello Azurite ,

    Hope you are well today and thanks for asking us. :slight_smile:

    Its was easy for us to identify where to place code because we have user's site information attached to this thread. it would be easy for us to do the same if you are willing to open new thread for your this question. Just open new thread, select site where you are facing this issue, tag Me or Predrag, or alternatively you can also include this thread's reference in your next thread's content.

    One of staff member will jump in, as soon as you open new thread. :slight_smile:
    Very Best Regards,
    Milan

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.