Skip to content

Instantly share code, notes, and snippets.

@thetwopct
Created June 13, 2022 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thetwopct/bc61bd218fde997cf0524210aebee712 to your computer and use it in GitHub Desktop.
Save thetwopct/bc61bd218fde997cf0524210aebee712 to your computer and use it in GitHub Desktop.
Add content before and after thumbnail images in WooCommerce product thumbnails
jQuery( document ).ready(
function( $ ) {
var newDiv = document.createElement('div');
$(newDiv).attr('id','slider-nav');
$(newDiv).attr('class','slider-nav');
$('.flex-control-nav').wrap('#slider-nav');
$('.flex-control-nav').wrap(newDiv);
$('.flex-control-nav').before('<span class="chevron-up"></span>');
$('.flex-control-nav').after('<span class="chevron-down"></span>');
}
);
// Related https://wordpress.org/support/topic/add-content-after-product-thumbnail-gallery/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment