Archived topic
Uber Menu Help Needed
10 replies · Started by Jason on November 16, 2018
Hello,
I am trying to setup the ubermenu plugin and I am unsure of where I went wrong. Can you assist? I installed the child theme and updated the functions.php.
I also updated the CSS in the child theme to this:
#site-navigation button.menu-toggle {
display: none;
}
This is what is in the functions.php file:
<?php
/**
* GeneratePress child theme functions and definitions.
*
* Add your custom PHP in this file.
* Only edit this file if you have direct access to it on your server (to fix errors if they happen).
*/
function generatepress_child_enqueue_scripts() {
if ( is_rtl() ) {
wp_enqueue_style( 'generatepress-rtl', trailingslashit( get_template_directory_uri() ) . 'rtl.css' );
}
}
add_action( 'wp_enqueue_scripts', 'generatepress_child_enqueue_scripts', 100 );
/* 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 );
}
The desktop version appears to be functioning but unsure if at the full capacity. The mobile menu still looks like GP. I can't seem to find the problem here. Could it be something with the header being a merged element? I do have the sticky navigation activated through GP. I don't know, I am reaching here.
I am getting frustrated by how much time and effort this is taking. Perhaps I should switch to a menu that is compatible with your theme? Do you have a solid suggestion in case?
Just noticed the sticky navigation is not working on desktop only mobile, fyi.
Hi there,
What happens if you turn off the Mobile Header?: https://docs.generatepress.com/article/mobile-header/
Nothing man.
How can I share my credentials with you?
Also can you please answer if you have a confirmed menu plugin that plays nice with your product.
Btw, grabbed your social plugin....excellent quality.
Can you turn off the mobile header so I can see what happens?
Their plugin seems to be working fine on desktop, and the only reason I can see it wouldn't be working on mobile is the mobile header is enabled.
Just turned it off. No menu shows on mobile when disabled.
I'm still seeing the mobile header.
I just went ahead and make the changes using developer tools, and I'm seeing this HTML comment: https://www.screencast.com/t/aWeheUdKqZ
Ok, just turned it off and cleared cache.
Looking at the code you sent, I was able to find the problem.
Thank you and sorry to bother you.
Awesome! Glad you got it working :)