0
votes
1answer
238 views

Create search form in menu as in Twenty Fourteen theme

I would like to replicate the search form in Twenty Fourteen's menu. I have tried to hide and show the search button with jQuery. My Problem is that the button is not sliding from left to right and ...
2
votes
1answer
119 views

wp_nav_menu() not working on Custom Search Page

I'm using WP Custom Search plugin to generate Advanced Search in one of my newly developed WP site. Though the plugin is not completely bug-free, but it's working just fine (excepts some Undefined ...
-1
votes
1answer
76 views

How To Add Class To Style Search Box

I am not very experienced with PHP but have managed to find a snippet to add a search bar to my main menu, using this code in my functions.php file: add_filter( 'wp_nav_menu_items','add_search_box', ...
0
votes
1answer
29 views

search form leads to 404

I'm using the follow code in my functions.php to add a search box to my primary nav menu - add_filter('wp_nav_menu_items','add_search_box_to_menu', 10, 2); function add_search_box_to_menu( ...
0
votes
1answer
89 views

Search form as list item in menu?

What is the best way to do this: <?php wp_nav_menu( array('menu'=>'Primary', 'container'=>'', 'items_wrap'=>'<ul id="%1$s" ...
2
votes
1answer
971 views

Custom search filter causes menu and query_posts problems

I'm using a custom search filter (using my custom query var type), like so: function fteh_pre_get_posts( $query ){ if( isset( $query->query_vars['type'] ) ) $types = explode( ',', ...
1
vote
1answer
263 views

get_search_form() doesn't appear to take parameter into account

I am creating a menu manually and trying to include the search form. this is taken from the Wordpress Docs "Building a simple menu list" at ...
20
votes
2answers
15k views

Customizing Only a Specific Menu using the “wp_nav_menu_items” Hook?

Thanks to some help on here, I've managed to add a custom search box to my main menu... by adding this to my theme's functions.php add_filter('wp_nav_menu_items','search_box_function'); function ...
2
votes
1answer
319 views

Where do custom menus get constructed?

I've created a simple menu in wp-admin>appearance>menus called main-nav. Works fine. However, I'd like to add a custom element to the end of the menu... a search box like the search box in the ...