woocommerce product orderby ID with custom order(N

2019-08-28 03:20发布

i have used shortcode '[products ids="1,3,2" orderby="ID"]' to get the products with id 1,3,2. on page display, product showing as 3,2,1 if using order parameter it will display in ASC order or DESC order. but my order should be 1,3,2. how can i achieve it.

Thanks in Advance.

2条回答
一纸荒年 Trace。
2楼-- · 2019-08-28 04:03

Try this:

[products ids="1,3,2" orderby="menu_order"]

Then try the order attribute

查看更多
虎瘦雄心在
3楼-- · 2019-08-28 04:14

To order products in the order you want, first collect your products id, then use: [products number="12" orderby="id" id="10,18"]

Change the number by the number of products you want to display, and the IDs by yours.

It works with categories too: [product_categories number="12" orderby="id" id="10,18"]

查看更多
登录 后发表回答