[Resolved] Display secondary image on hover feature

Home Forums Support [Resolved] Display secondary image on hover feature

Home Forums Support Display secondary image on hover feature

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2606751
    Manja

    In the shop archive when hovering over a product the second product image appears. Since it is not provided natively by WooCommerce, I think this feature comes directly from GeneratePress. Now I want to show more products on the home page with a WooCommerce block (handpicked products) and for consistency it would be great if it behaves the same way as the shop archive products. However, I can’t find the code in the theme files. Can you please give me a hint where it is?

    #2606874
    David
    Staff
    Customer Support

    Hi there,

    the second image is added by GP Premium Plugin:.

    gp-premium/woocommerce/functions/functions.php

    the function name is :generatepress_wc_secondary_product_image and starts at line 1237.

    But it is a PHP Function, that hooks into the Woo templates, and their Blocks don’t use those templates and they have those hooks ( if any ).

    NOTE: The Woo Shortcodes work exactly like the woo templates, so those will do this and respect the same styles automatically.

    #2606910
    Manja

    Oh GP Premium Plugin makes sense of course! I thought seeing the code would give me an idea of how to get it into the block. But your suggestion with the woo shortcode is actually a lot more time saving! Thanks a million. Didn’t see the forest for the trees.

    #2607096
    David
    Staff
    Customer Support

    Glad to be of help 🙂

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