Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

random - How randomize products display on a page using Divi theme and Woocommerce

I am doing a shop page using Divi theme and I am trying to display randomly products from a certain category.

The problem I have is that the theme does not have options to randomize the way the articles are displaying on the shop page.

I also tried a woocommerce shortcode:

[products limit="30" columns="3" category="cardigans-sweaters" cat_operator="AND" orderby="rand" order="rand"]

It worked well on desktop, but the problem is that the visual I get on mobile is not the one I want (it is one column instead of two, plus it kinda lost the CSS I did myself).

So yeah if someone knows a PHP code, or any code I could use to randomize, I would be really happy!

question from:https://stackoverflow.com/questions/65650730/how-randomize-products-display-on-a-page-using-divi-theme-and-woocommerce

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...