Shark Deng

Interactive Designer @Shanju Design in Shanghai

touched caffe / mxnet / python / wordpress / bootstrap / Arduino / Raspberry Pi / webgl / three.js / PIXI / 3dMax

Email

Github

Woocommerce – 函数

2019-11-20 17:16:03

1)进入用户账户
<?php get_permalink(woocommerce_get_page_id("myaccount")); ?>

2)修改商品单页-相关产品(放在functions.php)
add_filter('woocommerce_output_related_products_args', 'st_related_products');
function st_related_products($args){
 $args = array(
 'posts_per_page' => 6,  //展示产品数量
 'columns' => 6,   //几列
 'orderby' => 'rand');  //排序
 return $args;
};

3)
woocommerce_content();

 



——By SharkDeng
如果你喜欢我的文章,欢迎红包赞赏

Leave a Reply

Your email address will not be published. Required fields are marked *