I was doing some WordPress work last week and wanted to make related posts based on tags, so this little snippet of code came in handy:

Place this inside your loop on your single page, and it will use the post’s tags to find related posts to display: