Add this code into function.php of your child theme.
Please make all changes to the child theme files, and do not add the code directly to the theme files, otherwise after updating the theme your fixes will be lost
function.php
// ---------------------------------------------------------------------------------------------------------------------
// Groovy Menu plugin integration. With Astra 2.5+ version support.
// ---------------------------------------------------------------------------------------------------------------------
if ( ! function_exists( 'gm_astra_child_init_function' ) ) {
function gm_astra_child_init_function() {
if ( function_exists( 'groovy_menu' ) ) {
// We remove the function that rewrites all CSS classes from the Groovy Menu plugin.
remove_filter( 'nav_menu_link_attributes', 'astra_menu_anchor_class_for_nav_menus' );
// Remove default header.
remove_action( 'astra_header', 'astra_header_markup' );
// Add Groovy Menu for the header.
add_action( 'astra_header_before', 'gm_astra_child_add_groovy_menu', 5 );
}
}
}
if ( ! function_exists( 'gm_astra_child_add_groovy_menu' ) ) {
function gm_astra_child_add_groovy_menu() {
if ( function_exists( 'groovy_menu' ) ) {
groovy_menu();
}
}
}
style.css
/*
Theme Name: Astra Child (GroovyMenu)
Template: astra
Description: Astra Child theme with Groovy Menu plugin integration. Support Astra version 2.5+
Theme URI: https://wpastra.com/
Author: Grooni
Author URI: https://grooni.com/docs/groovy-menu/
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Version: 2.5.5.1
*/
.gm-navbar .gm-minicart ul.cart_list li a,
.gm-navbar .gm-minicart ul.product_list_widget li a {
font-weight: 700;
}
.gm-navbar .gm-minicart ul.cart_list li dl::after,
.gm-navbar .gm-minicart ul.cart_list li dl::before,
.gm-navbar .gm-minicart ul.product_list_widget li dl::after,
.gm-navbar .gm-minicart ul.product_list_widget li dl::before {
content: ' ';
display: table;
}
.gm-navbar .gm-minicart ul.cart_list li dl::after,
.gm-navbar .gm-minicart ul.product_list_widget li dl::after {
clear: both;
}
.gm-navbar .gm-minicart ul.cart_list li dl,
.gm-navbar .gm-minicart ul.product_list_widget li dl {
margin: 0;
padding-left: 0.5em;
border-left: 2px solid rgba(0, 0, 0, 0.1);
}
.gm-navbar .gm-minicart ul.cart_list li dl dd,
.gm-navbar .gm-minicart ul.cart_list li dl dt,
.gm-navbar .gm-minicart ul.product_list_widget li dl dd,
.gm-navbar .gm-minicart ul.product_list_widget li dl dt {
display: inline-block;
float: left;
font-size: inherit;
padding: 0 0 4px 0;
margin: 0;
}
.gm-navbar .gm-minicart ul.cart_list li dl dt,
.gm-navbar .gm-minicart ul.product_list_widget li dl dt {
font-weight: 700;
margin: 0 4px 0 0;
clear: left;
}
.gm-navbar .gm-minicart ul.cart_list li dl dd,
.gm-navbar .gm-minicart ul.cart_list li dl dd p,
.gm-navbar .gm-minicart ul.product_list_widget li dl dd p,
.gm-navbar .gm-minicart ul.product_list_widget li dl dd {
font-weight: 400 !important;
}
.gm-navbar .gm-minicart ul.cart_list li dl dd p,
.gm-navbar .gm-minicart ul.cart_list li dl dt p,
.gm-navbar .gm-minicart ul.product_list_widget li dl dd p,
.gm-navbar .gm-minicart ul.product_list_widget li dl dt p {
padding: 0;
margin: 0;
}
.gm-navbar .gm-minicart ul.cart_list li .quantity,
.gm-navbar .gm-minicart ul.product_list_widget li .quantity {
display: block;
clear: both;
}
.gm-navbar .gm-minicart a.remove {
display: block;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen-Sans, Ubuntu, Cantarell, Helvetica Neue, sans-serif;
font-weight: 400;
font-size: 18px;
width: 24px;
height: 24px;
text-align: center;
line-height: 21px;
border-radius: none;
color: inherit;
text-decoration: none;
border: none;
}
.gm-navbar .gm-minicart ul.product_list_widget li {
border-bottom: none;
}
.gm-navbar .gm-minicart ul.product_list_widget li img {
margin: 0 0 0.5em 0;
transform: none;
}
Groovy Menu > Integration
section