So here is a bit of a tricky one. I would like to add the new message count to my nav menu. I saw your instructions and I’m avoiding the “do shortcode” because I have a large site and like you said, it’s resource intensive.
So I did it using the php method and it worked just fine, but only on desktop versions. On a desktop it added the menu option “Messages Box” to the end of the list and displayed the new message count, so all fine there. But on my iphone, “Messages Box” isn’t displayed at all and neither is a count.
Ok, so here is the situation, and not sure you’ll be able to help but still wanted to ask.
So the theme has set a mobile menu but I really don’t like it, so I’m using a plugin called Responsive Menu which works great for creating responsive menus on all the mobile devices. And being a little clever, I just created a completely new menu in the Appearance>>Menu area and just didn’t assign it a location. That menu is working perfectly with the Responsive Menu plugin. Because of this setup, I have the menu ID number for the menu, but don’t have a theme_location as this is separate from the theme.
Is it possible to to use a menu ID instead of theme_location?