Search as menu item

How to place the search into a menu

Open up the Appearence -> Menus page and make sure the Ajax Search Pro is enabled on the screen options.

Under the Appearence -> Menus on the left side there will be an Ajax Search Pro menu group.

After clicking the Add To Menu button, a new menu item will be added to the menu. In this menu element you can choose which Search instance should be used.

  • Search (drop-down) - To select which search instance should be used

  • Prevent custom script events (checkbox) - If selected, the plugin will try to prevent custom events attached to the parent menu item. It may help in cases where menu has custom redirection or hover related events attached.

Legacy Method via shortcode

It is possible to use the search box shortcode in a menu as the title field. The menu item will be automatically replaced with the search bar. This simple guide will help you achieve that.

1) Under the Appearence -> Menus submenu open up (or create) the menu you want to edit.

2) Click on the Custom Links item and as the URL enter anything (I used the '#' character in this example), and as the Link Text paste the search shortcode, then click the Add to Menu button.

3) That's it. The menu item is created, now you can move it like any other one.

4) Make sure to save the menu, and the search should appear as a menu item on the front-end.

Last updated

Copyright Ernest Marcinko