• 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

Add search bar to secondary navigation

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 › Add search bar to secondary navigation

This topic is: not resolved

Tagged: search bar in secondary menu

  • This topic has 2 replies, 2 voices, and was last updated 11 years, 1 month ago by giraffeweb.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • December 2, 2014 at 11:43 am #133427
    giraffeweb
    Participant

    I added a search bar to the secondary navigation on the MetroPro theme so it aligns at the top beside the 2 navigation buttons. It worked a few months ago but stopped recently. Did something change in the latest Genesis update (or WP 4.1) to make it stop working?

    I followed the snippet found here:
    http://easywebdesigntutorials.com/modifying-the-search-box-in-genesis/

    code snippet is:
    /* Add a search box to the secondary menu - top bar*/
    add_filter( 'wp_nav_menu_items', 'genesis_search_secondary_nav_menu', 10, 2 );

    function genesis_search_secondary_nav_menu( $menu, stdClass $args ){
    if ( 'secondary' != $args->theme_location )
    return $menu;

    if( genesis_get_option( 'nav_extras' ) )
    return $menu;

    $menu .= sprintf( '<div class="secondary-search">%s</div>', __( genesis_search_form( $echo ) ) );

    return $menu;
    }

    http://www.scicu.org
    December 2, 2014 at 1:38 pm #133440
    Genesis Developer
    Member

    See this tips http://pwdtechnology.com/add-search-box-secondary-nav-genesis-child-theme/


    Download Genesis Featured Posts Combo Widget | Simple Grid Layouts Plugin for Posts, CPTs and terms
    You can request new tips/help.

    December 5, 2014 at 3:26 pm #133733
    giraffeweb
    Participant

    My original code works but not if I limit the height of the search bar. No matter what when you type in the search it drops into the bottom of the search input and it doesn't work. I am not sure if there is a way to actually customize the search input box so that it can be made smaller but will try a few things to see.

    Judy

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 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

© 2026 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