Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Navigation arrows in Woocommerce 3.x product gallery slider

Has anyone been able to add navigation arrows for Next/Prev slides in the new woocommerce slider?

The thumbnail navigation particularly on mobile/table is great, but having arrows as well for desktop users would be a dream! Arrows on the main product image are preferred over the lightbox. You will understand why on our site: http://52.56.199.58/collection/bedroom/giorgetti-syn-bedside-table/

Would seem an easy and obvious option that Woocommerce has forgotten. Any help or guidance would be much appreciated.

Cheers

like image 560
Black Pudding Avatar asked Nov 28 '22 05:11

Black Pudding


2 Answers

You can update the Flexslider options in WooCommerce V3 by hooking into the 'woocommerce_single_product_carousel_options' filter. So specifically to enable the navigation arrows the 'directionNav' option should be set to 'true'.

Put this example function in your functions.php file and you should be good to go:

// Update WooCommerce Flexslider options

add_filter( 'woocommerce_single_product_carousel_options', 'ud_update_woo_flexslider_options' );

function ud_update_woo_flexslider_options( $options ) {

    $options['directionNav'] = true;

    return $options;
}
like image 133
udog Avatar answered Dec 04 '22 09:12

udog


ul.flex-direction-nav {
    position: absolute;
    top: 30%;
    z-index: 99999;
    width: 100%;
    left: 0;
    margin: 0;
    padding: 0px;
    list-style: none;}

li.flex-nav-prev {float: left;}
li.flex-nav-next {float: right;}
a.flex-next {visibility:hidden;}
a.flex-prev {visibility:hidden;}
a.flex-next::after {visibility:visible;content: '\f105';
    font-family: FontAwesome;margin-right: 10px;font-size: 70px;    }
a.flex-prev::before {
    visibility:visible;
    content: '\f104';
    font-family: FontAwesome;    margin-left: 10px;font-size: 70px;}
like image 36
Marco Barbadoro Avatar answered Dec 04 '22 09:12

Marco Barbadoro