Skip to content

Instantly share code, notes, and snippets.

@zeshanshani
Last active April 17, 2019 22:38
Show Gist options
  • Save zeshanshani/5e634af86e49ce07c87b44728c62f64b to your computer and use it in GitHub Desktop.
Save zeshanshani/5e634af86e49ce07c87b44728c62f64b to your computer and use it in GitHub Desktop.
WooCommerce Enable Product Slider and Direction Nav. This CSS code will make your slider vertical aligned: https://gist.github.com/zeshanshani/e6214c0bc84789374fec3efa5b7bc141
<?php
//
// CSS code located here will make your slider vertical aligned:
// gist.github.com/zeshanshani/e6214c0bc84789374fec3efa5b7bc141
//
// Enable WooCommerce Flexslider options
add_filter( 'woocommerce_single_product_flexslider_enabled', 'za_enable_woocommerce_product_slider', 10 );
function za_enable_woocommerce_product_slider() {
return true;
}
// Update WooCommerce Flexslider options
add_filter( 'woocommerce_single_product_carousel_options', 'za_update_woo_flexslider_options' );
function za_update_woo_flexslider_options( $options ) {
$options['directionNav'] = true;
return $options;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment