Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author megamenu

    (@megamenu)

    Hi johny,

    MMM 1.9 has been updated so that it only applies its own styling to true menu elements (ul’s, li’s, a’s). This is to stop the styling from being incorrectly applied to widgets inside the menu.

    You could either roll back to v1.8.3.2 by installing the WP Rollback plugin, or you could add support for MMM into the WP Menu Cart plugin by adding the following code here:

    https://plugins.trac.www.ads-software.com/browser/wp-menu-cart/trunk/wp-menu-cart.php#L435

    if ( function_exists('max_mega_menu_is_enabled') ) {
        $menu_item_classes .= ' mega-menu-link';
    }

    Unfortunately the plugin doesn’t let us filter the menu item class so it’s not possible without code edits.

    Regards,
    Tom

    Thread Starter johnymas

    (@johnymas)

    Thanks,

    Johnymas

    Ewout

    (@pomegranate)

    Hi Tom & Johnymas,
    Thanks for the heads up. We’ll add a filter for the anchor classes in the next update, and also add built in support for Max Mega Menu.
    Until then you can use the following filter:

    add_filter('wpmenucart_menu_item_a', 'wpmenucart_menu_item_a', 10, 7);
    function wpmenucart_menu_item_a ( $menu_item,  $item_data, $options, $menu_item_a_content, $viewing_cart, $start_shopping, $cart_contents ) {
    	//add class to top menu item anchor/link
    	$menu_item = str_replace('a class="', 'a class="mega-menu-link ', $menu_item);
    	return $menu_item;
    }

    Let me know if that helps!

    Ewout

    Thread Starter johnymas

    (@johnymas)

    Hi Ewout

    Thanks for your answer but it doesn’t work for me. Class doesn’t want to be replaced. I checked with firebug and saw that everything still the same. I’ve also cleared CSS cache and there’s still no result.
    Is there something that I missed?

    Thread Starter johnymas

    (@johnymas)

    It works. I have one page that doesn’t work but on the other pages it works like a charm. It started to work when I added product to cart.

    Thanks a lot,

    Johnymas

    Ewout

    (@pomegranate)

    Hi Johnymas,
    This was probably an AJAX ‘cache’ (Fragments) thing, which actually requires you to close and open the browser (tab) or indeed add something to the cart. It should then work on all pages though, can you confirm that?

    Ewout

    Thread Starter johnymas

    (@johnymas)

    Hi Ewout

    Yes, it works on all pages.
    Thanks again.

    Johnymas

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘WP Menu Cart button isn't showing properly’ is closed to new replies.