WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. cadfile
    Member
    Posted 2 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:
    http://twitpic.com/988mxt

    The CSS I'm using:
    http://pastebin.com/3PKuSvyP

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

    http://wordpress.org/extend/themes/twentyeleven/

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    Try using Firefox with the Firebug add-on for this kind of CSS work.
    http://getfirebug.com/

  3. cadfile
    Member
    Posted 2 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
    Member
    Posted 1 year 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