Archived topic
"Display cart panel on add to cart" in entery website
3 replies · Started by jose on May 17, 2021
I want to use this option "Display cart panel on add to cart" in product page as well.
Actually this funtion its only for shop page (archive pages).
I want use it in:
- Product page
- Home page
- Every time I press add to cart button
Hi Jose,
Unfortunately that option will only work on shop pages currently.
We will be considering make that work in single product pages in the future version.
Sorry about that!
But maybe Can I use a little bit of code. Can you give me a hand (not to code) just an advice to achieve it
Hi there,
Try David's filter here:
https://generatepress.com/forums/topic/id-like-the-add-to-cart-panel-to-show-on-homepage/#post-1611907
You can try adding more condition.
Example:
add_filter( 'generate_woocommerce_show_add_to_cart_panel', function( $show ) {
if (is_front_page() || is_singular('product')) {
return true;
}
return $show;
} );