WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Advanced Custom Fields: Nav Menu Field

Add-On plugin for Advanced Custom Fields (ACF) that adds a 'Nav Menu' Field type.

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"
<?php if( get_field( 'side_menu' ) ) : ?>
    <div class="widget-area">
        <?php the_field( 'side_menu' ); ?>
    </div>
<?php endif; ?>

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?

I will do that soon, but you really should think about upgrading Advanced Custom Fields. ACF has seen a lot of great changes from v3 to the most current version.

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

I decided to return the Nav Menus without any added style, because I don't know what your website looks like. Frankly, I find it annoying when I have to compete with a plugin's styles, especially when a lot of them use !important. Now I can use this plugin on many sites with only a little extra styling work ahead of me.

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

Requires: 3.4 or higher
Compatible up to: 3.9.1
Last Updated: 2014-4-16
Downloads: 14,415

Ratings

5 stars
5 out of 5 stars

Support

0 of 3 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

3 people say it works.
0 people say it's broken.

100,4,4 100,2,2 80,5,4
100,2,2 100,2,2 100,4,4
100,1,1
100,1,1
100,1,1
100,2,2
100,3,3
100,3,3