2017-03-12 54 views

回答

0

在此簡碼,屬性作品與變型產品和您的實際簡碼不能真正發揮作用爲特色產品的功能是不是屬性

你最好嘗試使用[recent_products]簡碼,而不是在所有的特色產品設置一個「特色」類別(以「特色」鼻涕蟲) ...

然後你可以使用簡碼是這樣的:

[recent_products category='featured' operator='NOT IN'] 

你並不需要設置orderbyorder參數作爲默認的是:

$atts = shortcode_atts(array(
    'per_page' => '12', 
    'columns' => '4', 
    'orderby' => 'date', 
    'order' => 'desc', 
    'category' => '', // Slugs 
    'operator' => 'IN' // Possible values are 'IN', 'NOT IN', 'AND'. 
), $atts, 'recent_products'); 

請參閱相關文檔:WC_Class Shortcodes - Recent Products shortcode source code