A navigation menu field for ACF
Install via Composer:
$ composer require joshuafredrickson/acf-nav-menu
The field will return the nav menu ID.
Use with wp_nav_menu
:
$nav_menu_ID = get_field('nav_menu');
wp_nav_menu($args = ['menu' => $nav_menu_ID]);
Use with log1x/navi (recommended):
$nav_menu_ID = get_field('nav_menu');
(new \Log1x\Navi\Navi())->build($nav_menu_ID);
$field->addField('my_nav_menu_field', 'nav_menu');
If you discover a bug in ACF Navigation Menu, please open an issue.
Contributing whether it be through PRs, reporting an issue, or suggesting an idea is encouraged and appreciated.
ACF Nav Menu is provided under the MIT License.