Original question How do I get menu items using slug and not ID
I need to get a specific menu, but I can't use ID, since the menu ID on my dev is not the same as on my staging and prod server.
WP doc says that
wp_get_nav_menu_itemscan be used with menu slug. But how do I know what slug is created? I tested with what I thought would be a slug, but I got no menu items.
My initial though was that I needed to fetch a menu in order to get menu items in an array / object so that I could add an extra menu item.
There is little documentation on how one can get a menu item by using a slug, so I got a bit stuck. If you should have the answer, please add this as well.
My goal was to add a 'home' link based on a specific condition.
Thanks to the feedback, I have rewritten my question so it makes more sense ;)