Advanced Custom Fields: Nav Menu Field

Wordpress Plugin
Download latest - 2.0.0

Developers

Faison

Download Stats

Today 4
Yesterday 5
Last Week 172
All Time 55,142
Banner 772x250

Add Navigation Menus to Advanced Custom Fields (ACF) with the Nav Menu Field plugin! This plugin adds the Nav Menu Field type to ACF (version 5 & 4), allowing you to select from the menus you create in the WordPress Admin backend to use on your website's frontend.

Using ACF, you can set the Nav Menu Field to return the selected menu's:

  • ID for lightweight coding,
  • Object for more involved programming, or
  • HTML (generated from wp_nav_menu) for quickly displaying a menu.

I created this plugin because I needed to display a secondary menu that changed depending on what page you're on. Most of those pages were children of the same page, but then I had to throw a couple of Custom Post Types in there too. Because of the Custom Post Types, I couldn't just grab the top most parent for the current page and use wp_list_pages. So I did some research and decided to extend the functionality of my favourite plugin, Advanced Custom Fields. Now when I create a new Page or Custom Post, I just select the menu from a drop down menu!

Feel free to try this add-on on your dev site, ask questions on the support link above, and please review this add-on. By leaving a rating and review, you help this plugin become even better!

Advanced Custom Fields Compatibility

This add-on will work with:

  • version 5
  • version 4

Releases (5 )

Version Release Date Change Log
2.0.0 2014-10-15
  • Added ACF v5 class.
  • Updated code to follow coding standards
  • Updated the ACF v4 class to use the updated code found in the ACF v5 Class
1.1.2 2014-04-16
  • Fixed a silly mistake related to allowing Null for a Nav Menu Field. Basically, it was storing the string "null" when you don't select a menu, that's taken care of now.
1.0.0 2014-02-21
  • Initial Release.

=

1.1.0 2014-02-21
  • Added a field which allows users to choose the containing element for the Menu's ul. See wp_nav_menu's container parameter
1.1.1 2014-02-21
  • I forgot to add a default value for the Menu Container field, so I added 'div' as the default value. If you upgraded from 1.0.0 to 1.1.0 and had WP_DEBUG enabled, you would receive a warning about an unknown index. Since I like debug mode to run without warnings, I fixed this.