Site logo

Archived topic

How to Set Ubermenu to Full Width on Desktop?

3 replies · Started by Greg on January 27, 2020

Viewing posts 1–4 of 4

I have the Ubermenu plugin. On desktop, the menu is set to full width, but it's only filling the full width of the container. I was able to figure this out on another one of my websites at tgpzgaming.com, but I'm struggling trying to figure out how to set the menu to cover the entire width. Is there a customization for this or some CSS? Thanks for your help.

Hi there,

Have you checked with Ubermenu's support for this?

The menu system is completely coming from the plugin and GP doesn't have any control at all:
https://www.screencast.com/t/iVbmFBgHuW

Let me know if I'm missing something :)

Leo,

For the website I had working, I found some code I placed in my functions.php file. It fixed the issue. I placed the code below. Hopefully it can be helpful to someone else. Thanks!

/* 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 );
}

Thanks for reporting back!

This archived topic is closed to new replies.