I would like to add a custom class to my existing menu items. The problem is, that I would like to do something like this:
<li class="<?php echo get_post_meta($post->ID, "_icon", true); ?>">...</li>
<li class="<?php echo get_post_meta($post->ID, "_icon", true); ?>">...</li>
<li class="<?php echo get_post_meta($post->ID, "_icon", true); ?>">...</li>
or
<li><a class="<?php echo get_post_meta($post->ID, "_icon", true); ?>">...</a></li>
So I have a custom meta tags for posts and pages and they supposed to be a classes of li or a elements.
I know that I have to use custom walker, and I found this article, but I dont know how to add custom meta tags to $item_output and this example adds new menu.
Greetings