Hi Niklas,
Please can you post a link to your site so I can compare the HTML thats being output on the page?
Regards,
Tom
Hello Tom,
Thanks for your fast reply. Thats the Link to the Page.
http://drahtseil24.de.w0135547.kasserver.com/
(Its just the “Saveking” Item which is activ)
BR
Niklas
-
This reply was modified 7 years, 11 months ago by
nklsbrn.
Hi Niklas,
Under Mega Menu > Menu Themes, can you uncheck “Reset Widget Styling”?
That should get things looking better, but I may need to take another look after that.
Regards,
Tom
Hi Niklas,
Ah, I see why you have turned on that option now.
You will also need to copy your themes header.php file (or the file responsible for outputting the main navigation) to your child theme and remove this class:
https://screencast.com/t/1sGerqkHJ
Regards,
Tom
-
This reply was modified 7 years, 11 months ago by
megamenu.
Hi Tom,
after unchecking the “Reset Widget Styling”, nothing but the text is shown in the megamenu.
Could you please take a look?
BR,
Niklas
Hi Niklas,
Please check my last reply also. Once that class is removed it should display correctly 🙂
Regards,
Tom
Hi Niklas,
I’ve taken a closer look at GeneratePress and can see it’s not quite that simple to change that class.
Please make a child theme, and in the child themes functions.php file, add:
function mega_menu_remove_main_navigation_class($classes, $class) {
$new_classes = array();
foreach ($classes as $class) {
if ($class == 'main-navigation') {
$new_classes[] = 'main-navigation-mmm';
} else {
$new_classes[] = $class;
}
}
return $new_classes;
}
add_filter('generate_navigation_class', 'mega_menu_remove_main_navigation_class', 10, 2);
Regards,
Tom
Hi Tom,
thank you so much for helping me.
I was trying integrate the code with the code snippets plugin. It says:
The code snippet you are trying to save produced a fatal error on line 14:
Cannot redeclare mega_menu_remove_main_navigation_class() (previously declared in /www/htdocs/w0135547/drahtseil24.de/wp-content/plugins/megamenu-edit/megamenu-edit.php:13)
Can you tell me whats wrong here?
Regards,
Niklas
Hi Niklas,
Here is an alternative solution which should be a bit easier.
Please go to Appearance > Customize > Additional CSS and add the following:
.mega-menu-primary .main-navigation ul ul {
height: auto;
background: transparent;
position: relative;
left: auto;
width: auto;
box-shadow: none;
pointer-events: auto;
opacity: 1;
}
Regards,
Tom
Hi Tom,
thank you so much! That works perfectly!
Regards,
Niklas
-
This reply was modified 7 years, 11 months ago by
nklsbrn.