1 回答
TA贡献1934条经验 获得超2个赞
不要覆盖任何核心文件...相反,您可以使用 woocommerce_single_product_carousel_options 过滤器挂钩,如下所示:
add_filter( 'woocommerce_single_product_carousel_options', 'filter_single_product_carousel_options' );
function filter_single_product_carousel_options( $args ) {
$args['animation'] = 'fade';
$args['easing'] = 'swing';
$args['controlNav'] = true;
$args['slideshow'] = true;
$args['touch'] = true;
$args['animationSpeed'] = 1200;
$args['slideshowSpeed'] = 3500;
$args['animationLoop'] = true; // Breaks photoswipe pagination if true.
$args['allowOneSlide'] = true;
$args['prevText'] = "<"; // String - Set the text for the "previous" directionNav item
$args['nextText'] = ">"; // String - Set the text for the "next" directionNav item
return $args;
}
代码位于活动子主题(或活动主题)的functions.php 文件中。它应该有效。
- 1 回答
- 0 关注
- 97 浏览
添加回答
举报