How to set menu Display location

You can retrieve nav menu locations with get_nav_menu_locations int[] Associative array of registered navigation menu IDs keyed by their location name. If none are registered, an empty array. https://developer.wordpress.org/reference/functions/get_nav_menu_locations/ This refers to a theme mod internally named nav_menu_locations which can be used to update the locations. You can modify that returned value and then save … Read more

Two Homes In Navigation Menu

This sounds like the same problem I had, WordPress added a home option to the menu without it being added in the appearance menu items so I could not remove it. I googled for ages and found two solutions. Neither of them worked but if I combined the two they did. Open the functions.php file … Read more

Custom navigation / menu output (walker?)

This should do it for you.. (UNTESTED) Create a file in your theme folder called nav-menu-walker.php and include this file in your theme functions.php file. nav-menu-walker.php class My_Nav_Menu_Walker extends Walker_Nav_Menu { function start_el( &$output, $item, $depth = 0, $args, $id = 0 ) { $indent = ( $depth ) ? str_repeat( “\t”, $depth ) : … Read more

Wrapping my ‘s with

I don’t recommend having anything in-between a ul and li. If you make the anchor tag display:block that fills the list, the whole list tag will be clickable. So dont put any height, width, or padding on the list and manage it all instead with the anchor. a { display: block; width: 100%; }

Navigation menu, remove item from desktop

Although this is not really a WordPress question, but the visibility property does not actually HIDE any element. It only fades it so you can’t see it, but it still reserves space for it. You need to use the display property: .mobile-only { display:hidden; } @media (min-width:992px) { .desktop-only { display:block !important; } } @media … Read more