Contributors: derweili
Tags: acf menu nav
Requires at least: 5.0
Tested up to: 5.2
Stable tag: trunk
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Add Custom ACF Field to select Nav Menus
Add Custom ACF Field to select Nav Menus
How to use the field on the frontend:
$menu_id = get_field('_field_name' );
if( $menu_id ){
$menu = get_term($menu_id);
wp_nav_menu( array(
'menu' => $menu,
) );
}
This ACF field type is compatible with:
- ACF 4
- Copy the
derweili-acf-nav-menu-field
folder into yourwp-content/plugins
folder - Activate the ACF Nav Menus Field plugin via the plugins admin page
- Create a new field via ACF and select the Nav Menu type
- Read the description above for usage instructions
- Initial Release.