Part of the solution would be to replace 'tag__in' with 'category__in' but you also need to find the code where get_related_posts() is being called and switch out the tags array argument with a categories array.
That code might be in your single.php file somewhere above the code you posted. It...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.