Add custom meta to nav menu items

here is a quick code that should do the job, paste this in your theme’s functions.php file basically what it does is hide all regular class input boxes and adds a new select dropdown which changes the value of the hidden input based on the selected value. and it looks like this; function menu_item_class_select(){ global … Read more

wp_nav_menu: check if the list item has children and add a class to anchor link

I was able to add a “parent” CSS class to the anchor tag of menu items who have children by following this answer: Add ‘has_children’ class to parent li when modifying Walker_Nav_Menu Here’s an example: class Main_Nav extends Walker_Nav_Menu { /** * @see Walker::start_el() * @since 3.0.0 * * @param string $output Passed by reference. … Read more