Add Dividers or Separators Between Nav Menu Items

Use a custom walker. Extend start_el() to print <li class=”menu_separator”><hr></li> if the menu title is just a ‘-‘. functions.php function wpse38241_setup_menu() { register_nav_menu( ‘main-menu’, ‘Main Menu’ ); } add_action( ‘after_setup_theme’, ‘wpse38241_setup_menu’ ); /** * Replaces items with ‘-‘ as title with li class=”menu_separator” * * @author Thomas Scholz (toscho) */ class Wpse38241_Separator_Walker extends Walker_Nav_Menu { … Read more

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

Remove Container Element From wp_nav_menu() Markup

FYI :container => ” is a string operation and it’s default set by div you can’t use true or false like bool expression. Just change the container => ‘ul’ then i hope you will get what you want to see. for more details please read this : https://developer.wordpress.org/reference/functions/wp_nav_menu/ Thanks Musa