[Resolved] I’d like the Add to cart panel to show on homepage

Home Forums Support [Resolved] I’d like the Add to cart panel to show on homepage

Home Forums Support I’d like the Add to cart panel to show on homepage

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1611591
    Adrien

    Dear GP Team,

    If you check my product cat archive page (link enclosed /product-category/bracelets/)

    When I click Add to cart I see the Add to cart panel showing on the top.

    I would like to know if it is possible to have the same on the home page when I click a to cart?

    I’m using Niche Theme.

    Thank you very much. Best, Adrien

    #1611907
    David
    Staff
    Customer Support

    Hi there,

    not sure 100% if this will work but try adding the following PHP Snippet to your site:

    add_filter( 'generate_woocommerce_show_add_to_cart_panel', function( $show ) {
        if (is_front_page()) {
            return true;
        }
    
        return $show;
    } );
    #1614733
    Adrien

    Hi David. Thank you! It works perfectly. Appreciate your help as always.

    #1615043
    David
    Staff
    Customer Support

    Glad to be of help

    #1796535
    jose

    I am trying the same, but appears empty

    #1796593
    Ying
    Staff
    Customer Support

    Hi Jose,

    Could you open a new topic and link us to your site?

    Thanks!

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.