WordPress Function: Get Related posts by tags


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:

Filed Under: Code, wordpress

Roger Stringer spends most of his time solving problems for people, and otherwise occupying himself with being a dad, cooking, speaking, learning, writing, reading, and the overall pursuit of life. He lives in Penticton, BC.

Connect: Twitter |  Google+
This content is supported by readers like you.