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

Declaration of mandoe_menu_walker::start_el(&$output, $item, $depth, $args) must be compatible with Walker::start_el(…)

An entirely different approach. nav menu item are stored in posts table, so you can technically attach a post_meta into it, even other data like nav item class already stored in post mata table. However this wasn’t easy to do before. but after 5.4.0 release, they have implemented hooks to easily do this. Here’s the … Read more

Get Menu Items from REST API (React)

getMenu() fetches data from the GET /wp/v2/menus/<id> endpoint, whereas getMenuItem() fetches data from the GET /wp/v2/menu-items/<id> endpoint, but they have the same usage syntax, where you just need to pass the ID of a menu or menu item. As for getMenuItems() and another function you can use — getMenus(), the endpoints are GET /wp/v2/menu-items (for … Read more

Remove Unused Menu Locations

Seems like you’re using a parent theme or a plugin that registers those menu locations. If that’s the case then you shouldn’t remove your last function. You need to keep the remove_default_menu function in your functions file. If you are not using a parent theme or some sort of plugin than that means you are … Read more

Problems with draft website pages

Possibly yes, possibly no. I would recommend setting them to private and published so that you can see links working. Drafts cannot be selected as menu links, nor do they have permalinks until they’re published (only the shortlinks and only while logged in), so that is why they aren’t working. If you’re afraid of taking … Read more

Any way to use classic Menus in Full Site Editing?

Is there any way to enable the Appearance->Menus in the admin dashboard while FSE theme is enabled I noticed that in some FSE themes the classic Menus admin page shows up under Appearance: when they include a register_nav_menus( … ) call within the after_setup_theme hook to define the relevant classic menu locations. See for example … Read more

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