Navigation arrows in Woocommerce 3.x product gallery slider
Asked Answered
M

3

5

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

Martz answered 21/9, 2017 at 21:17 Comment(0)
T
24

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;
}
Tails answered 27/9, 2017 at 12:52 Comment(2)
thanks for your answer, is there any way to update the thumbnail options as well? I want them to act like a slider. see my full question here: #49938606Idiotic
@udog, How to add the slider for the thumbnail?Sw
H
7
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;}
Headword answered 14/3, 2018 at 21:26 Comment(0)
R
6

Some more tested value with woocommerce 3.5.3

add_filter('woocommerce_single_product_carousel_options', 'ud_update_woo_flexslider_options');
function ud_update_woo_flexslider_options($options) {
      // show arrows
      $options['directionNav'] = true;
      $options['animation'] = "slide";

      // infinite loop
      $options['animationLoop'] = true;

      // autoplay (work with only slideshow too)
      $options['slideshow'] = true;
      //$options['autoplay'] = true;

      // control par texte (boolean) ou bien par vignettes
      // $options['controlNav'] = true;
      //$options['controlNav'] = "thumbnails";

      // $options['mousewheel'] = true;

      return $options;
  }
Ruin answered 13/1, 2019 at 17:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.