Archived topic
Ubermenu and Mobile menu
7 replies · Started by Mohammed on May 23, 2018
Please help to solve the issue of getting Mobile and ubermenu showing in the same time on desktops and showing 2 mobile menus on mobile devices.
I have tried so many suggestions from the forum some of them removed the mobile menu from desktops but not from mobile devices.
I am looking forward to your help.
Hi there,
Can you point me to the solutions you've tried? Just so I don't try to get you to do the same thing over :)
I have tried few I can't remember which one I used. some of theme remove mobile menu from the desktop but still 2 menus in mobile devices one work the other only show nothing.
I appreciate your assistance in solving this issue. thanks Tom.
please have a look th site at
http://www.yourwp.co.uk
You can remove the GP mobile menu like this:
#site-navigation button.menu-toggle {
display: none;
}
I'm not sure why their mobile menu is displaying on desktop - have you checked with their support?
Hi Tom Thanks for your time.I have copied the above to "Simple CSS" and is not working
Just for your attention. I have another site with GP theme and I am using Child theme is working perfect.
http://www.pcplanet.co
I just don't know why is not working in my daughter's site I am using
http://www.yourwp.co.uk
temporary before I can transfer it to her live one.
Regards
MS
It doesn't look like the menu plugin is set up the same on the second site as it is on the first site. The second site is still using the GP navigation element, whereas the first site isn't.
Have you done this?: https://generatepress.com/forums/topic/ubermenu-and-generatepress/#post-514355
Hi Tom,
I copied this from the first site (GeneratePress Child: Theme Functions (functions.php) to the child theme (functions.php) in 2nd site.
/* Replace the theme's menu with UberMenu */
function generate_navigation_position(){
if( function_exists( 'ubermenu' ) ){
ubermenu( 'main' , array( 'theme_location' => 'primary' ) );
}
}
/* Stop the theme from filtering the menu output */
add_action( 'wp_head' , 'stop_generatepress_menu_filter' );
function stop_generatepress_menu_filter(){
remove_filter( 'walker_nav_menu_start_el', 'generate_nav_dropdown', 10, 4 );
}
When I click on save the file I get this message:
(Unable to communicate back with site to check for fatal errors, so the PHP change was reverted. You will need to upload your PHP file change by some other means, such as by using SFTP.)
Did you grab the function from here?: https://generatepress.com/forums/topic/ubermenu-and-generatepress/#post-514355
It's a little different to what you have.
Let me know :)