Home › Forums › Front End PM PRO › Adding New Message to Mobile Menu
- This topic has 4 replies, 2 voices, and was last updated 6 years, 7 months ago by Chris.
- AuthorPosts
- May 14, 2019 at 10:53 pm #24561ChrisParticipant
Hello Sharmin,
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.
Any ideas?
ThanksMay 15, 2019 at 6:07 am #24594Shamim HasanKeymasterSome theme use separate menu for mobile. Please ask your theme developers how to add menu item for mobile, is there any separate hook or theme_location?
Let me know so that a can assist you to add this if require.
May 17, 2019 at 12:57 am #24654ChrisParticipantOk, 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?
ThanksMay 17, 2019 at 10:55 am #24691Shamim HasanKeymasterIf we know menu slug then we can use that. use like following (change MENU_SLUG with your menu slug)
add_filter( 'wp_nav_menu_MENU_SLUG_items', function( $items, $args ) { $items .= '<li><a href="'. fep_query_url( 'messagebox' ) .'">' . sprintf(__('Message Box%s', 'front-end-pm'), fep_get_new_message_button() ) . '</a></li>'; return $items; }, 99, 2);May 17, 2019 at 3:50 pm #24702ChrisParticipantThanks, for the speedy reply. I’ll give it a try.
- AuthorPosts
You need to purchase ‘Front End PM PRO’ to create topic in this support forum.
If you already purchased ‘Front End PM PRO’ please LOGIN.