Does anyone know how to grab the data from an ACF menu item and display it while using Navi?
(https://github.com/Log1x/navi)
For example, I've successfully added a simple text input to each menu item:
<?php
namespace App\Fields;
use Log1x\AcfComposer\Field;
use StoutLogic\AcfBuilder\FieldsBuilder;
class Menus extends Field
{
/**
* The field group.
*
* @return array
*/
public function fields()
{
$menus = new FieldsBuilder('menus');
$menus
->setLocation('nav_menu_item', '==', 'all');
$menus
->addText('subtext', [
'label' => 'Sub-text'
]);
return $menus->build();
}
}
I am attempting to pull that input data to the menus under the menu title but can't quite determine how to do so.
The documentation from ACF for Displaying Fields requires setting up a function for wp_nav_menu_objects but that doesn't work using Brandon's Navi package.
Does anyone know how to grab the data from an ACF menu item and display it while using Navi? (https://github.com/Log1x/navi)
For example, I've successfully added a simple text input to each menu item:
I am attempting to pull that input data to the menus under the menu title but can't quite determine how to do so.
The documentation from ACF for Displaying Fields requires setting up a function for wp_nav_menu_objects but that doesn't work using Brandon's Navi package.
https://www.advancedcustomfields.com/resources/adding-fields-menu-items/