I am using Advanced Custom Fields on my pages to create a field called page_color
. The field is a select that allows for 4 different values. In my menu, I would like pages to appear automatically and have a class is-orange
or is-green
(or whatever color) in the list item, based on the value the user has selected on the corresponding page. I am not certain the best way to approach (e.g., walker function, extending the wp_nav_menu_items
function) and would appreciate some help/direction.
Thanks!