Twenty Eleven
[resolved] Changing search box in nav bar to Google custom search (4 posts)

  1. cadfile
    Posted 4 years ago #

    I'm stumpped.

    I want to have my search box in the nav bar instead of the sidebar and in my child theme I replaced the code in the searchform.php and copied over the searchform css to my css file and changed all the query terms to "q" as instructed.

    But the box still breaks my layout - appearing above the navbar and below the main image

    Here is an image of the broken layout:

    The CSS I'm using:

    I really don't want to do it with a plugin or a sidebar widget - any help or hit would be appreciated


  2. esmi
    Forum Moderator
    Posted 4 years ago #

    Try using Firefox with the Firebug add-on for this kind of CSS work.

  3. cadfile
    Posted 4 years ago #

    I did use Firebug. It is calling css from google so not sure how to stop it from doing it.

    It just seems a lot easier to use a widget in the sidebar but I liked the form in the nav bar

  4. cadfile
    Posted 3 years ago #

    I finally figured out a solution.

    I forgot to change the ID in the form to match 'searchform' when the theme uses.

    I replaced the searchform code with the Google CSE code but needed to change the ID name in addition to the search variable from "s" to "q"

    From form id="cse-search-box" to form id="searchform"

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic