Bla*_*ing 1 flexslider woocommerce
有没有人能够在新的woocommerce滑块中为Next/Prev幻灯片添加导航箭头?
特别是在移动/桌面上的缩略图导航很棒,但是对于桌面用户来说也有箭头是一个梦想!主产品图像上的箭头优于灯箱.您将在我们的网站上了解原因:http: //52.56.199.58/collection/bedroom/giorgetti-syn-bedside-table/
看起来Woocommerce已经忘记了一个简单而明显的选择.任何帮助或指导将不胜感激.
干杯
小智 14
您可以通过挂钩'woocommerce_single_product_carousel_options'过滤器来更新WooCommerce V3中的Flexslider选项.因此,专门为了启用导航箭头,'directionNav'选项应设置为'true'.
把这个示例函数放在你的functions.php文件中,你应该好好去:
// 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;
}
Run Code Online (Sandbox Code Playgroud)
小智 6
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;}
Run Code Online (Sandbox Code Playgroud)
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;
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5719 次 |
| 最近记录: |