Archived topic
Keep main menu static on the cart page.
3 replies · Started by José on March 30, 2019
Hello, I'm personalizing the menu of the cart page, so as not to distract the customer from the purchase process, I hid the secondary menu where the categories go:
.page-id-7 #menu-categorias {
display:none;
}
I have the main menu is a sticky menu, just like the logo.
My query is, What CSS can I use to make it static? fixed at the top.
The attention is appreciated.
Hi there,
You can tell GP not to enable its sticky function on the cart like this:
add_action( 'wp_enqueue_scripts', function() {
if ( function_exists( 'is_cart' ) && is_cart() ) {
wp_dequeue_script( 'generate-sticky' );
wp_dequeue_style( 'generate-sticky' );
}
}, 100 );
Adding PHP: https://docs.generatepress.com/article/adding-php/
Let me know :)
Hi Tom, it works perfectly
Thank you
You're welcome :)