updated   : April 22, 2013
we now have 608 snippets
category wp_nav_menu

Add search form to specific wp_nav_menu

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will add the search form to your wordpress wp_nav_menu. Don’t forget to update the MENU-NAME to specify the menu you wish to display within, just in case you have multiple menus.

read more

Display top 8 authors in wp_nav_menu using wp_list_authors

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will add an authors item to your wp_nav_menu listing top eight authors by post count.

read more

Insert calendar into wp_nav_menu

wordpress snippet

Needed this for a recent project as a client wanted to display the wordpress calendar as a dropdown item within the menu. Add this snippet to the functions.php of your wordpress theme will add a new menu item to your wp_nav_menu that has a submenu calendar.

read more

Remove every class and id from the wp_nav_menu

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will remove nearly every class and id from the wp_nav_menu except for the current-menu-item class. This is a great little snippet that will make your wp_nav_menu a little cleaner enjoy.

read more

Update: Add bookmark links to the wp_nav_menu

wordpress snippet

This is an updated version of the previous snippet I posted on the 11th, I added support for link “target” and “link relationships (XFN)” Adding this snippet to the functions.php of your wordpress theme will add bookmarks from a specified category to the wp_nav_menu.

read more

Add bookmark links to the wp_nav_menu

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will add bookmarks from a specified category to the wp_nav_menu. This also supports the sub-menu class so you can create pure css dropdown menus.

read more

Get assigned menu location with get_nav_menu_locations

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will let you get the name of an assigned menu based on the location name. Returns false if the defined location has no menu assigned. Useful for assigning titles to menus.

read more

Add a login link to the wp_nav_menu

wordpress snippet

Adding this snippet to the functions.php of your wordpress theme will add a login link to your wp_nav_menu or if the user is already logged in a logout link.

read more