Hi,
I am trying to create a related post section with the help of a query loop. However, I am trying to achieve a loop where it should auto-detect the current Taxonomies (either tag or category) and only display posts from that taxonomies.
i.e., if a post has the tag “shopping,” it should auto-detect that tag and only display posts from the “shopping” tag.
The current loop allows you to select a specific tag(s) or category(s) to filter the posts. It would be impossible to create so many display rules and hooks to display relevant posts under each post. The easiest way would be to auto-detect the tag(s) or category(s) of the current post and display posts from it.
Even better with an option “random” in the “order by” query loop.