WordPress Related Posts by Tags without Plugin

There are a lot of plugins for wordpress related posts. But most of them not set with your theme and break your theme when you integrate. Even some plugins harmful for your database and hosting etc. We have a very simple solution, use the following code this will show related posts by using tags taxonomy of the current post.

Use of this code is very simple copy the following code from here and past in functions.php file. and then call the function name ” relatedPostsbyTags()” in your template file where you want to display related posts.

Leave a Reply

Your email address will not be published. Required fields are marked *