# Related posts using the loop

**URL:** <https://forum.pinegrow.com/t/related-posts-using-the-loop/992>\
**Category:** Pinegrow WP\
**Tags:** custom-wp-query\
**Created:** [June 7, 2017, 11:30pm UTC](https://forum.pinegrow.com/t/related-posts-using-the-loop/992 "2017-06-07T23:30:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alejuu](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/alejuu/32/647_2.png) [@alejuu](https://forum.pinegrow.com/u/alejuu)\
**Post date:** [June 7, 2017, 11:30pm UTC](https://forum.pinegrow.com/t/related-posts-using-the-loop/992/1 "2017-06-07T23:30:31Z")

</div>

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/](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

---

<div class="post-metadata">

**Author:** ![fogseller](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/fogseller/32/4260_2.png) [@fogseller](https://forum.pinegrow.com/u/fogseller)\
**Post date:** [July 25, 2022, 2:15pm UTC](https://forum.pinegrow.com/t/related-posts-using-the-loop/992/2 "2022-07-25T14:15:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![matjaz](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/matjaz/32/5_2.png) [@matjaz](https://forum.pinegrow.com/u/matjaz)\
**Post date:** [August 1, 2022, 5:04pm UTC](https://forum.pinegrow.com/t/related-posts-using-the-loop/992/3 "2022-08-01T17:04:19Z")

</div>

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.
