Skip to content

Instantly share code, notes, and snippets.

@faurelia
Last active March 18, 2022 05:31
Show Gist options
  • Select an option

  • Save faurelia/e9d2b83daae3b3e9b434c0e0ff4803ee to your computer and use it in GitHub Desktop.

Select an option

Save faurelia/e9d2b83daae3b3e9b434c0e0ff4803ee to your computer and use it in GitHub Desktop.
WooCommerce: Replace product thumbnails with dots navigation
<?php
// options
// array(
// 'rtl' => is_rtl(),
// 'animation' => 'slide',
// 'smoothHeight' => true,
// 'directionNav' => false,
// 'controlNav' => 'thumbnails', // can be boolean
// 'slideshow' => false,
// 'animationSpeed' => 500,
// 'animationLoop' => false, // Breaks photoswipe pagination if true.
// 'allowOneSlide' => false,
// )
add_filter( 'woocommerce_single_product_carousel_options', 'update_woo_flexslider_options' );
function update_woo_flexslider_options( $options ) {
$options['controlNav'] = true;
return $options;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment