Wordpress.com how are 'related posts' determined?

Wordpress.com allows inclusion of 'related posts' below each post.

How does it choose which posts to display - by matching category, tag, or both?

Topic wordpress.com-hosting Wordpress

Category Web


I believe that related posts have similar tags, at least according to this article, which includes code for a query that will include related posts: http://www.wpbeginner.com/wp-tutorials/how-to-display-related-posts-in-wordpress/

Couldn't find anything about related posts in a quick look in the Codex.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.