Home › Forums › WoodMart support forum › Woodmart Mega Menu issues and Side cart issues › Reply To: Woodmart Mega Menu issues and Side cart issues
September 6, 2023 at 4:28 am
#493520

Elise Noromit
Member
Hello,
Please replace the pages with custom links: https://monosnap.com/file/ut3hL6b5QxtW5ANRGr16MNQP5OOJBA and select the custom HTML block: https://xtemos.com/docs-topic/create-mega-menu/
Please remove the custom CSS and add this code to the functions.php of the child theme:
if ( ! function_exists('wd_revers_cart_content')) {
function wd_revers_cart_content( $cart_contents ) {
if ( $cart_contents && is_array( $cart_contents ) ) {
$cart_contents = array_reverse( $cart_contents );
}
return $cart_contents;
}
add_action('woocommerce_before_mini_cart_contents', function () {
add_action('woocommerce_get_cart_contents', 'wd_revers_cart_content');
});
add_action('woocommerce_after_mini_cart', function () {
remove_action('woocommerce_get_cart_contents', 'wd_revers_cart_content');
});
}
Best Regards