Title: Advanced Custom Fields: Nav Menu Field
Author: Faison
Published: <strong>9 พฤษภาคม 2013</strong>
Last modified: 15 ตุลาคม 2014

---

Search plugins

![](https://ps.w.org/advanced-custom-fields-nav-menu-field/assets/banner-772x250.
png?rev=733149)

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://s.w.org/plugins/geopattern-icon/advanced-custom-fields-nav-menu-field_fdfdfd.
svg)

# Advanced Custom Fields: Nav Menu Field

 By [Faison](https://profiles.wordpress.org/faison/)

[Download](https://downloads.wordpress.org/plugin/advanced-custom-fields-nav-menu-field.2.0.0.zip)

 * [Details](https://th.wordpress.org/plugins/advanced-custom-fields-nav-menu-field/#description)
 * [Reviews](https://th.wordpress.org/plugins/advanced-custom-fields-nav-menu-field/#reviews)
 *  [Installation](https://th.wordpress.org/plugins/advanced-custom-fields-nav-menu-field/#installation)
 * [Development](https://th.wordpress.org/plugins/advanced-custom-fields-nav-menu-field/#developers)

 [Support](https://wordpress.org/support/plugin/advanced-custom-fields-nav-menu-field/)

## Description

Add [Navigation Menus](https://codex.wordpress.org/Navigation_Menus) to [Advanced Custom Fields](https://wordpress.org/extend/plugins/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](https://codex.wordpress.org/Function_Reference/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](https://codex.wordpress.org/Function_Reference/wp_list_pages).
So I did some research and decided to extend the functionality of my favourite plugin,
[Advanced Custom Fields](https://wordpress.org/extend/plugins/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

## Screenshots

[⌊Adding the Nav Menu Field to an Advanced Custom Fields Field Group⌉⌊Adding the
Nav Menu Field to an Advanced Custom Fields Field Group⌉[

Adding the Nav Menu Field to an Advanced Custom Fields Field Group

[⌊Creating your menu in the WordPress Admin backend⌉⌊Creating your menu in the WordPress
Admin backend⌉[

Creating your menu in the WordPress Admin backend

[⌊Selecting the previously created menu in the meta box created by Advanced Custom
Fields⌉⌊Selecting the previously created menu in the meta box created by Advanced
Custom Fields⌉[

Selecting the previously created menu in the meta box created by Advanced Custom
Fields

[⌊Viewing the (not styled) menu displayed by calling 'the_field()' in the sidebar⌉⌊
Viewing the (not styled) menu displayed by calling 'the_field()' in the sidebar⌉[

Viewing the (not styled) menu displayed by calling ‘the_field()’ in the sidebar

## Installation

Follow the following instructions: https://codex.wordpress.org/Managing_Plugins#
Installing_Plugins

## FAQ

  Installation Instructions

Follow the following instructions: https://codex.wordpress.org/Managing_Plugins#
Installing_Plugins

  Can you show a quick example of how to use this?

Sure can!

 1. Create a new field group
 2. Add a Nav Menu and set the Field Label to `Side Menu` (this will cause the Field
    Name to be `side_menu`)
 3. Set the Nav Menu’s Return Value to `Nav Menu HTML`
 4. Set the Location Rules to Show if “Post Type” “is equal to” “Page”
 5. Save the Field Group
 6. Now in your themes sidebar.php, put the following code before or after any of the
    div’s with class=”widget-area”

Finally, create or edit a page, select a menu in the Side Menu field, and view the
page to see that menu in the sidebar!

  Will you make this plugin compatible with Advanced Custom Fields v3?

No.

  Why does the Nav Menu returned by your plugin look like an unstyled list of links?

So that you can style it yourself. I don’t want to step on your toes 🙂

  I added the Nav Menu Field to Pages, selected my menu when creating a new page,
but the menu doesn’t show. What gives?

First, check that you added the necessary ACF code to your templates. If you don’t
know what I’m talking about, read up on how to use [Advanced Custom Fields](https://wordpress.org/extend/plugins/advanced-custom-fields/).
If you’re already familiar with ACF and you still can’t figure out why the menu 
isn’t showing up, start a new support thread, include details and a little code,
and I’ll do my best to help you.

## Reviews

![](https://secure.gravatar.com/avatar/224e2d05eb97de95c6f3eedad07319c3b07fb22ec601b299f70e9349427342d7?
s=60&d=retro&r=g)

### 󠀁[Still works perfectly with ACF 6](https://wordpress.org/support/topic/still-works-perfectly-with-acf-6/)󠁿

 [Gabor Lippert](https://profiles.wordpress.org/lunule/) 19 กุมภาพันธ์ 2023

All in the title 🙂 Quick addition: as others feedbacked here many years ago, this
plugin is a must-have to all developers actively working with ACF – it's a shame
it's not showing up in the WP plugins earch for the sole reason it hasn't been updated
for a long time.

![](https://secure.gravatar.com/avatar/19c1a1fa01710afcce4cf56433a4c8b12a3c183287e1ffdd1e06bef008a8be04?
s=60&d=retro&r=g)

### 󠀁[Works with 4.9.8](https://wordpress.org/support/topic/not-working-with-4-9-8-2/)󠁿

 [Nikola Dimitrijević](https://profiles.wordpress.org/bukizvanipera/) 31 ตุลาคม 
2018

It works with 4.9.8, but could use few more options

![](https://secure.gravatar.com/avatar/994dc652d9680348bd8592c51e9d01741f2379ab9dc9d9dd2c6d0d449569dffb?
s=60&d=retro&r=g)

### 󠀁[Exactly what I needed](https://wordpress.org/support/topic/exactly-what-i-needed-530/)󠁿

 [Sheenmo](https://profiles.wordpress.org/guanyixi/) 28 มิถุนายน 2018

Worked perfectly. It took me 5 minutes to install, add menu and output it to a page.

![](https://secure.gravatar.com/avatar/86a20c3639ccdc22f611059a32f7158bce9da48aa91ff257ffdd0dbadfda7be1?
s=60&d=retro&r=g)

### 󠀁[Let’s don’t make any mistakes here…](https://wordpress.org/support/topic/lets-dont-make-any-mistakes-here/)󠁿

 [Yuval](https://profiles.wordpress.org/yuvalsabar/) 13 มิถุนายน 2018

Let's don't make any mistakes here – this addon is perfect and needs no changes,
that's why there is nothing to update here. Used it in many sites. Thank you!

![](https://secure.gravatar.com/avatar/d49b08a65edac57118afb1f1ce40df1a40a1e5662de0824398adf5c0a65cff28?
s=60&d=retro&r=g)

### 󠀁[Oldie but Goodie](https://wordpress.org/support/topic/oldie-but-goodie-2/)󠁿

 [Tracy Rotton](https://profiles.wordpress.org/taupecat/) 15 ธันวาคม 2017

This plugin might be old, but it still works perfectly and does exactly what I needed.
No PHP errors, warnings, or notices, either. Running with ACF PRO 5.6.7 and WordPress
4.9.1.

![](https://secure.gravatar.com/avatar/4c2e49df26fd98cf6bbe5b7c102d9c43fe9f7e89b55a65eb6c8b437c760edcfc?
s=60&d=retro&r=g)

### 󠀁[Works great!](https://wordpress.org/support/topic/works-great-4420/)󠁿

 [Darius](https://profiles.wordpress.org/darius89/) 4 พฤศจิกายน 2017

Does exactly what it should do

 [ Read all 32 reviews ](https://wordpress.org/support/plugin/advanced-custom-fields-nav-menu-field/reviews/)

## Contributors & Developers

“Advanced Custom Fields: Nav Menu Field” is open source software. The following 
people have contributed to this plugin.

Contributors

 *   [ Faison ](https://profiles.wordpress.org/faison/)

[Translate “Advanced Custom Fields: Nav Menu Field” into your language.](https://translate.wordpress.org/projects/wp-plugins/advanced-custom-fields-nav-menu-field)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/advanced-custom-fields-nav-menu-field/),
check out the [SVN repository](https://plugins.svn.wordpress.org/advanced-custom-fields-nav-menu-field/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/advanced-custom-fields-nav-menu-field/)
by [RSS](https://plugins.trac.wordpress.org/log/advanced-custom-fields-nav-menu-field/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 2.0.0

 * 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

 * 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.1.1

 * 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.

#### 1.1.0

 * Added a field which allows users to choose the containing element for the Menu’s
   ul. See [wp_nav_menu’s container parameter](https://codex.wordpress.org/Function_Reference/wp_nav_menu#Parameters)

#### 1.0.0

 * Initial Release.

## Meta

 *  Version **2.0.0**
 *  Last updated **9 ปี ago**
 *  Active installations **8,000+**
 *  WordPress version ** 3.4 or higher **
 *  Tested up to **4.0.38**
 *  Language
 * [English (US)](https://wordpress.org/plugins/advanced-custom-fields-nav-menu-field/)
 * Tags
 * [acf](https://th.wordpress.org/plugins/tags/acf/)[acf4](https://th.wordpress.org/plugins/tags/acf4/)
   [acf5](https://th.wordpress.org/plugins/tags/acf5/)[advanced custom fields](https://th.wordpress.org/plugins/tags/advanced-custom-fields/)
   [custom fields](https://th.wordpress.org/plugins/tags/custom-fields/)
 *  [Advanced View](https://th.wordpress.org/plugins/advanced-custom-fields-nav-menu-field/advanced/)

## Ratings

 5 out of 5 stars.

 *  [  32 5-star reviews     ](https://wordpress.org/support/plugin/advanced-custom-fields-nav-menu-field/reviews/?filter=5)
 *  [  1 4-star review     ](https://wordpress.org/support/plugin/advanced-custom-fields-nav-menu-field/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/advanced-custom-fields-nav-menu-field/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/advanced-custom-fields-nav-menu-field/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/advanced-custom-fields-nav-menu-field/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/advanced-custom-fields-nav-menu-field/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/advanced-custom-fields-nav-menu-field/reviews/)

## Contributors

 *   [ Faison ](https://profiles.wordpress.org/faison/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/advanced-custom-fields-nav-menu-field/)