Woocommerce 3.x产品库滑块中的导航箭头 [英] Navigation arrows in Woocommerce 3.x product gallery slider

查看:83
本文介绍了Woocommerce 3.x产品库滑块中的导航箭头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人能在新的woocommerce滑块中为Next/Prev幻灯片添加导航箭头吗?

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

特别是在移动设备/桌子上的缩略图导航非常棒,但是对于台式机用户来说,拥有箭头也将是一个梦想!主产品图片上的箭头优先于灯箱.您将了解为什么在我们的网站上: http://52.56.199.58/collection/bedroom/giorgetti-syn-bedside -table/

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/

Woocommerce似乎忘记了一个简单而显而易见的选择.任何帮助或指导将不胜感激.

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

欢呼

推荐答案

您可以通过链接到'woocommerce_single_product_carousel_options'过滤器来更新WooCommerce V3中的Flexslider选项.因此,为了启用导航箭头,应将"directionNav"选项设置为"true".

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'.

将此示例函数放在您的functions.php文件中,您应该会很好:

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;
}

这篇关于Woocommerce 3.x产品库滑块中的导航箭头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆