Related products loop

I build the product single product template
At the bottom, I want to place the query products loop by Related
but don’t know how to set

1 Like

Hi @dreamstart,

Welcome to the forum.
Have you tried the “Related posts” element?

Have a great day,
Thomas

Loop can be designed?

Unfortunately not.

But if I recap correctly, the “Related product” element is nothing more than comparing the taxonomies of your current product to the others and showing the ones that share the most.

So you can aslo achieve the same result by creating a loop where you will query all the posts that share the same taxonomies of your current one by using the “Posts” element.

To do that, you will have to add a taxonomy query and used dynamic data to catch the taxonomies of your current product. Last but not least, don’t forget to exclude current post of your related loop in the query options.

Have a great day,
Thomas

2 Likes

According to your teaching method, I have set it successfully, but a strange thing happened, that is, I set the order to be random, but random doesn’t work

Hello the random have a timer.
Thank u @ HomeSweetTom it works like a charm !