Search Box on Topbar and/or Nav Area
-
I’m trying to put a search box at the top right of the website
dpffredericksburg.com
I found that I can put it in the Topbar, but I don’t really like it there.(Since I can’t figure out how to get the text to move over to the left side of the topbar, and/or stay on the same line as the searchbox, it simply doesn’t look right and won’t work.)
I’d like to put a searchbox either in or above the “Main” Navigation area. (On this particular page, I’m using it as the store menu). I’ve tried putting the following code into the Custom CSS box, but it didn’t do anything.
add_filter( 'wp_nav_menu_items','add_serch_box', 10, 2 ); function add_search_box( $items, $args ) { if ( 'main' == $args->theme_location ) $items .= '<li>' . get_search_form( 'echo=0' ) . '</li>'; return $items; }
Any help would be greatly appreciated! Thanks!!!!
BTW…loving the theme! Great work! ??
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Search Box on Topbar and/or Nav Area’ is closed to new replies.