Ever wanted to know how you can generate related posts with a function?
Here’s the code for a related posts based on tags and categories; fully commented.
Copy and paste the function into your theme’s functions.php then call it in your loop or anywhere else like this:
Replace $postID with the post ID of the post you want; or use the_ID(); in the loop.
This is verified and used on http://www.q8pd.com
If you want to know more, leave a comment and ask! Enjoy!