• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Search Bar in Navigation Menu

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Search Bar in Navigation Menu

This topic is: not resolved

Tagged: Magazine Pro, navigation menu, search bar

  • This topic has 7 replies, 5 voices, and was last updated 10 years, 3 months ago by kiso.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • February 13, 2015 at 6:32 pm #140795
    pennywisemama
    Member

    Hi, I finally figured out how to add a search bar to my top navigation menu. Now, I just can't figure out the right css to get it to move to the right side. I have the magazine pro theme. Any help would be appreciated. Thanks!

    http://thepennywisemama.com/
    February 13, 2015 at 6:42 pm #140797
    pennywisemama
    Member

    Ok, I was able to move it to the right but now I need to make the background white and make the box bigger. How do I do that?

    February 13, 2015 at 8:09 pm #140807
    neilgee
    Member

    You can change in your style.css on line 781 - the background color value for the color and the padding for the size -

    .genesis-nav-menu .search-form input {
    background-color: #1cd5ff;
    border: 1px solid #222;
    color: #fff;
    text-transform: uppercase;
    width: 180px;
    padding: 10px 20px;
    }

    Here I changed the value to #1cd5ff and changed the padding to make it wider (20px)


    Neil Gee
    WP Beaches
    Coolest Guides

    February 14, 2015 at 1:35 pm #140863
    pennywisemama
    Member

    Perfect! Thank you!

    February 14, 2015 at 11:35 pm #140891
    elucidateTX
    Member

    Isn't this possible to do with no coding?

    I'm using the Enterprise Pro theme, and I can go to the Genesis>Theme Settings menu. There, I look for the subsection titled "Navigation." In that subsection there's a drop-down box for Primary Navigation Extras. One of those items is Search Form.

    This worked well for me. It put a search field on the right in my primary navigation bar, and I didn't have to touch the code.

    August 28, 2015 at 9:51 am #163902
    kiso
    Member

    Hello penny Could I explain how you set the menu in search?

    August 28, 2015 at 10:24 am #163904
    sasamarkovicks
    Member

    this theme are perfect and good but this for search is anoying me


    simple page

    August 28, 2015 at 11:03 am #163909
    kiso
    Member

    add_filter( 'wp_nav_menu_items', 'theme_menu_extras', 10, 2 );
    /**
    * Filter menu items, appending either a search form or today's date.
    *
    * @param string $menu HTML string of list items.
    * @param stdClass $args Menu arguments.
    *
    * @return string Amended HTML string of list items.
    */
    function theme_menu_extras( $menu, $args ) {
    //* Change 'primary' to 'secondary' to add extras to the secondary navigation menu
    if ( 'primary' !== $args->theme_location)
    return $menu;
    //* Uncomment this block to add a search form to the navigation menu

    ob_start();
    get_search_form();
    $search = ob_get_clean();
    $menu .= '<li class="right search">' . $search . '';

    //* Uncomment this block to add the date to the navigation menu

    $menu .= '<li class="right date">' . date_i18n( get_option( 'date_format' ) ) . '';

    return $menu;
    }

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble