Log1x / navi

A developer-friendly alternative to the WordPress NavWalker.
https://github.com/Log1x/navi
MIT License
315 stars 30 forks source link

ACF Menu Item on Navi? #16

Closed patrickjc closed 4 years ago

patrickjc commented 4 years ago

Hi Brandon,

This probably isn't an issue but I have been trying to get ACF Fields displaying on the menu items on Navi - I have tried a few different methods but struggling to get the data appearing.

What is the best way to approach this on Navi?

https://www.advancedcustomfields.com/resources/adding-fields-menu-items/

I am tying to build up a megamenu and have some fields on the menu items to determine dropdown styles.

I have tried your method from docs but this is related the standard ACF page fields rather than the menu item fields I think.

Also have Sage directives and tried with @field but no joy.

Thanks.

Log1x commented 4 years ago

I'm terribly sorry for the delayed reply.

You would simply do {{ get_field('example', $item->id) }} in your loop.