• 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 BOX

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 BOX

This topic is: not resolved

Tagged: search box, secondary nav bar

  • This topic has 7 replies, 3 voices, and was last updated 10 years, 1 month ago by ShariLee.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • May 14, 2015 at 8:39 pm #152281
    ShariLee
    Member

    I am using OutreachPro, and I have a primary and secondary nav bar. I would like to put the search box at the far right
    on the secondary nav bar--from which I have now deleted everything else. I have gone into the menu and tried to add it, but nothing happens. Can anyone help me with this please? Thanks. ShariLee


    ShariLee Beynon
    GoldaVere IMS

    http://www.theglutenalarm.com
    May 14, 2015 at 8:46 pm #152282
    Doug
    Participant

    Like this http://www.uacnet.org

    May 16, 2015 at 8:55 pm #152455
    Brad Dalton
    Participant

    Try Genesis nav menu extras code


    Tutorials for StudioPress Themes.

    May 18, 2015 at 9:59 pm #152655
    ShariLee
    Member

    I have tried and tried to figure this out. I put the code you suggested above into my CSS code area, but nothing happens. I think it still requires css styling, at which I am lousy! http://www.theglutenalarm.com I wanted the search box to be
    right on the secondary nav bar. I still need help.


    ShariLee Beynon
    GoldaVere IMS

    May 18, 2015 at 10:23 pm #152659
    Brad Dalton
    Participant

    The code is PHP code and should be added to the end of your child themes functions.php file using a code editor like Notepad++ for Windows or Text Wrangler for Mac.

    Another option is to use File Manager in cPanel.

    Please remove any PHP code from your style.css file or any other area designed for CSS only.

    If you still require assistance, i can do the work for you.


    Tutorials for StudioPress Themes.

    May 18, 2015 at 11:20 pm #152672
    ShariLee
    Member

    I actually just tried that, and nothing happened... the only difference is I added it to the beginning of the child themes functions.php file. I'll go back in and move it to the bottom and see if that helps.


    ShariLee Beynon
    GoldaVere IMS

    May 18, 2015 at 11:22 pm #152673
    Brad Dalton
    Participant

    I did test the code locally and it works.


    Tutorials for StudioPress Themes.

    May 18, 2015 at 11:27 pm #152675
    ShariLee
    Member

    Well, I went in to the theme function php file and pasted it at the bottom. I entered:
    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;

    }
    I guess I'm too tired to fight with this anymore. Thank you for trying to help me. I'll go at it again tomorrow.


    ShariLee Beynon
    GoldaVere IMS

  • 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