Support » Plugin: WooCommerce » Add content after product thumbnail gallery?

  • Resolved James

    (@bonkerz)


    Is there any hook to add content after the thumbnail images?

    I want to add a custom <li> to the images per product

    • This topic was modified 1 month, 1 week ago by  Andrew Nevins.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi there,

    You can try woocommerce_before_single_product_summary, will require a bit of CSS styling to position it correctly below the gallery

    add_action( 'woocommerce_before_single_product_summary' , 'my_custom_contnet', 30 );
     
    function my_custom_contnet() {
       echo '<div class="custom" style="background: #fdfd5a; clear:left; width:50%">';
       echo '<p>My custom contnet here..</p>';
       echo '</div>';
    }

    Thanks for the reply, unfortunately it doesn’t work, as WooCommerce is using the flex slider. This just puts things before/after the images, not the thumbnails themselves.

    Moderator Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Yo @bonkerz Use the code button here to wrap your code in backticks. I’ve fixed your post for now

    Plugin Support Jesse Pearson

    (@jessepearson)

    Automattic Happiness Engineer

    @bonkerz If you’re referring to adding an additional <li> element for the <ol class="flex-control-nav flex-control-thumbs"> element, that would need to be done via JavaScript. This is due to the slider dynamically adds those elements according to the <div data-thumb= elements output by the wc_get_gallery_image_html() function.

    I am setting this to resolved for now, if you need anything else, you can set it back to not resolved when you reply.

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