Move Search Box to Secondary Nav

Community Forums Forums Design Tips and Tricks Move Search Box to Secondary Nav

This topic is: not resolved

This topic contains 1 reply, has 2 voices, and was last updated by  Genesis Developer 1 year ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #95007



    I’d like to move the search box to the secondary nav – the nav at the top of a page. I’m using the NewsPro theme, which is responsive. Ideally the solution will also be responsive.

    The site is


    Genesis Developer

    You can use this code

    add_filter( 'wp_nav_menu_items', 'genesis_sub_nav_right', 10, 2 );
    function genesis_sub_nav_right( $menu, stdClass $args ){
       if ( 'secondary' !== $args->theme_location )
    		return $menu;
       // I hate output buffering, but I have no choice
       $search = ob_get_clean();
       $menu  .= '<li class="right search">' . $search . '</li>';
       return $menu;

    Download Genesis Featured Posts Combo Widget | Coming Soon: Simple PRO Genesis Themes
    Need customization help for Genesis Websites, contact me | Checkout my PRO Genesis Child Theme .

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.