Managing menus in “The Store” theme [closed]

You have the same menu assigned to both locations. In order to decouple them you need to deselect “menu-principal” from the Top Menu location. It’s possible the theme may try to automatically populate a location when no menu is assigned. If this is the case, create a new menu with no items and assign it.

Only display nav menu if it is populated with menu items?

This solution was shared by @TheDeadMedic over here… $menu_exists_and_has_items = wp_nav_menu( array( ‘theme_location’ => ‘example-menu-location’, ‘container_class’ => ‘example-menu-container’, ‘menu_class’ => ‘example-menu-class’, ‘fallback_cb’ => false, ‘echo’ => false ) ); if ( $menu_exists_and_has_items ) { … Importantly, note that the menu is not echoed in the initial array saved to PHP variable…

How do I have WordPress use the tag for generated menus?

If you’re just trying to replace <ul…> and </ul> with <menu…> and </menu> in the generated HTML, you can use the wp_nav_menu filter: add_filter( ‘wp_nav_menu’, ‘wpse_426932_menu_fix’ ); /** * Fixes the menu HTML to use <menu> instead of <ul>. * * @param string $html The menu HTML. * @return string The fixed menu HTML. */ … Read more

In WordPress, I want to use code to filter out one menu item (page) from displaying when I call wp_nav_menu() function

That’s not the filter to use, instead use the wp_nav_menu_objects filter documented at: https://developer.wordpress.org/reference/hooks/wp_nav_menu_objects/ The docs contain a helpful code example provided by a contributor at the bottom, which I’ve modified slightly: function wpse_unset_menu_items( $menu_objects, $args ) { // remove this if you want it on all menus not just a specific menu aka primary_menu: … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)