跳到内容

Advanced Custom Fields: Nav Menu Field

v2.0.0

Faison · 2013年5月9日 上架

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

正在使用
8,000+
评分
5.0 / 5
累计下载
14 万
最近更新
2017年11月28日
33 条评价需要 WordPress 3.4+已测试到 4.0.38

贡献者

截图

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

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

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums