Home › Forums › Backend Issues (wp-admin) › i cant use get field in walker › Reply To: i cant use get field in walker
Are the fields added on the page or on the nav menu item itself ( Via Appearance -> Menus )?
Have you tried get_field( $item->ID )
?
Additionally, the walker method should look like this:
function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
Your current method is missing $item
entirely. It may be helpful to turn on PHP Debugging.
https://developer.wordpress.org/reference/classes/walker_nav_menu/
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.