Home › Forums › General Issues › Menu Item custom radio button field show results based on value › Reply To: Menu Item custom radio button field show results based on value
I recently did something similar, but then scrapped it so I’m going by memory here. But you can add classes to the menu items in the filter. At this point I can’t give you exact details. I do remember that one of the properties of each menu item is a list of classes to be applied to that item.
I would start by seeing what is there to be used.
add_filter('wp_nav_menu_objects', 'my_wp_nav_menu_objects', 10, 2);
function my_wp_nav_menu_objects($items, $args) {
echo '<pre>'; print_r($items); echo '</pre>';
return $items;
}
This may lead you to your answer. If not post what this outputs and I will see if I can help you with it.
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.