I have a custom post single page template and I display related posts there (I don’t use Related block, I built it myself)
I want that related post to show only posts that are in the same category.
For example on a Greek Salad recipe single page I want related recipes to be only from the Salads category.
How can I do it with loop? Now I just fetch all the recipes, because I couldn’t find solutions and I don’t like when on salad recipe related post is from Cake category.