Posts element query string not working after theme update

Hi there,

on my single product layout I’m using a posts element to show related products.
Looper provider query string:
category_name={{dc:term:slug}}&post_type=product&posts_per_page=3&offset=0&ignore_sticky_posts=1&post__not_in%5B0%5D={{dc:post:id}}
(displays 3 products of the same category excluding the current product).

I still get a preview of it in the layout builder but in frontend the space is empty after updating the theme.
What happened/changed?

I don’t want to use the related products element as it lacks funcionality.

Thanks

Hi @ArtOfSpring,

Thanks for reaching out.
The Query String needs to be modified a little, in place of category_name it should be product_cat. I went ahead and replaced the category_name with product_cat and started showing the related products as expected.
The new Query String is as follows:

product_cat={{dc:term:slug}}&post_type=product&posts_per_page=3&offset=0&ignore_sticky_posts=1&post__not_in%5B0%5D={{dc:post:id}}

NOTE: In the previous version {{dc:term:slug}} in Single Product layout does not return and that is why it shows all the products with older Query String. But the issue was fixed with the latest release and {{dc:term:slug}} start returning the current product category and that is why the category_name with that category does not return anything while returning all for blank value.

Thanks

Thanks a lot!

Hi @ArtOfSpring,

You are most welcome.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.