Related posts using the loop

Hi, I found a way to create related posts for the single post without using a plugin http://www.wpbeginner.com/wp-themes/how-to-add-related-posts-with-a-thumbnail-without-using-plugins/ , actually, it doesn’t work when I try it. But I was wondering if there’s a way to accomplish this using a custom query for the loop, maybe including posts that have the same tags or the same category? is more a curiosity than a real support question but it will be nice to accomplish that with the loop.
Thanks

Hello, same question! is it possible to do this with Show posts / Custom Query?
thank you :slight_smile:

Thinking out loud, it could be done with tags or categories, by passing get_the_category() as the Categories parameter of the Show Posts action. That would list posts with the same category. Order by Random. Check Skip shown posts option on Show Posts to skip showing the main post under the related.