Related Posts - category query

I know I can’t build a related post query yet.

But can I show recent posts in the same category? Using layout builder on a single post. Excluding the current post from the query?

Hello Kate,

Thanks for writing to us.

To display the related posts you can use this query string, you need to set the Looper Provider as Query String and then add this query.

Test-Page-Builder-Pro - 2022-06-01T003159.655

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

Hope it helps
Thanks

Hmm it’s not working on this page its displaying post for other categories?

Hello Kate,

Please check out this thread first:

You may need to add: 'category__in' => {{dc:term:id}} so that the post items will be on the same category.

Kindly let us know how it goes.

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