PHP code example of joshuafredrickson / acf-nav-menu

1. Go to this page and download the library: Download joshuafredrickson/acf-nav-menu library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

joshuafredrickson / acf-nav-menu example snippets


$nav_menu_ID = get_field('nav_menu');
wp_nav_menu($args = ['menu' => $nav_menu_ID]);

$nav_menu_ID = get_field('nav_menu');
(new \Log1x\Navi\Navi())->build($nav_menu_ID);

$field->addField('my_nav_menu_field', 'nav_menu');