2015-11-04 101 views
0

我想使用Woocommerce短代碼或PHP函數顯示隨機排序的X近期產品。WordPress Woocommerce:按隨機順序顯示最近的產品

這簡碼...

[recent_products per_page="16" columns="4" orderby="rand"] 

...顯示16種隨機從產品的整個目錄(而不是16個最後產品隨機排序)。

即使我的Woocommerce設置指定默認的排序是隨機的,採用這種簡碼...

[recent_products per_page="16" columns="4"] 

...顯示最近16個產品通過日期排序。

回答

0

Recent Products

[recent_products per_page="16" columns="16" orderby="rand" order="ASC"] 

我不知道,但你可以請嘗試這個代碼?

+0

它不起作用。 「rand」不是「order」屬性的有效值。 – Patouf

相關問題