Is this best practice for Dynamically adding items to WordPress menus?
It’s always hard to say which way to solve some problem is the best, because it’s based on opinions and believes. But… There are 3 ways I would use (depending on context and needs) to add such menu item: 1. Using wp_get_nav_menu_items filter Exactly the way you’re doing in your question. The only problem with … Read more