Welcome to JiKe DevOps Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k 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

Please log in or register to answer this question.

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to JiKe DevOps Community for programmer and developer-Open, Learning and Share
...