# Display posts from a category in the Single.php

**URL:** <https://forum.pinegrow.com/t/display-posts-from-a-category-in-the-single-php/823>\
**Category:** Pinegrow WP\
**Created:** [April 2, 2017, 10:17am UTC](https://forum.pinegrow.com/t/display-posts-from-a-category-in-the-single-php/823 "2017-04-02T10:17:46Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![thvi](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/thvi/32/522_2.png) [@thvi](https://forum.pinegrow.com/u/thvi)\
**Post date:** [April 2, 2017, 10:17am UTC](https://forum.pinegrow.com/t/display-posts-from-a-category-in-the-single-php/823/1 "2017-04-02T10:17:46Z")

</div>

Hi 🙂

I would like display posts from a category in the Single.php. I found the code to do that: [http://www.thibautsoufflet.fr/wordpress-afficher-des-articles-associes-de-meme-categorie/](http://www.thibautsoufflet.fr/wordpress-afficher-des-articles-associes-de-meme-categorie/)  
But I would like to reproduce this code on Pinegrow. Do you know how I can do that?

Thanks for your help 🙂

---

<div class="post-metadata">

**Author:** ![Rob](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/rob/32/9_2.png) [@Rob](https://forum.pinegrow.com/u/Rob)\
**Post date:** [April 2, 2017, 6:42pm UTC](https://forum.pinegrow.com/t/display-posts-from-a-category-in-the-single-php/823/2 "2017-04-02T18:42:14Z")

</div>

Hi @thvi try this. When you add “The Loop” to the part of the page you want to display your post enter a name for query into the “ **Custom WP Query Name** ” section, see screenshot (I used stuff\_category\_query but enter whatever you feel is appropriate).

![](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/1X/ef76721db9928257bafc10e2940d0a92c40ab0c2.png)

Then in the **Category Parameters** section further down enter the name of the category you want to display (_in my case the category I wanted to display was called “stuff”_). At that stage I just saved/exported and it displayed only my chosen category posts.

![](https://canada1.discourse-cdn.com/flex036/uploads/pinegrow/original/1X/fb27937b69a6d0929f9128c21a22328bc2063be0.png)

Hope this works for you, let us know if you have any issues and we’ll try to help.

---

<div class="post-metadata">

**Author:** ![thvi](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/thvi/32/522_2.png) [@thvi](https://forum.pinegrow.com/u/thvi)\
**Post date:** [April 3, 2017, 11:51am UTC](https://forum.pinegrow.com/t/display-posts-from-a-category-in-the-single-php/823/3 "2017-04-03T11:51:09Z")

</div>

Thanks a lot! It works 😀

---

<div class="post-metadata">

**Author:** ![Rob](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/rob/32/9_2.png) [@Rob](https://forum.pinegrow.com/u/Rob)\
**Post date:** [April 3, 2017, 12:07pm UTC](https://forum.pinegrow.com/t/display-posts-from-a-category-in-the-single-php/823/4 "2017-04-03T12:07:32Z")

</div>

@thvi Glad to hear it worked, thanks for let us know.

---

<div class="post-metadata">

**Author:** ![24degrees](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/24degrees/32/136_2.png) [@24degrees](https://forum.pinegrow.com/u/24degrees)\
**Post date:** [January 13, 2019, 7:49pm UTC](https://forum.pinegrow.com/t/display-posts-from-a-category-in-the-single-php/823/5 "2019-01-13T19:49:19Z")

</div>

Does anyone knows how to do this in Pinegrow for the “current category”?

Like on [www.mydomain.com/category/thiscategory](http://www.mydomain.com/category/thiscategory) and then the loop shows all related posts that are members of thiscategory?

Thanks

---

<div class="post-metadata">

**Author:** ![jcamachott](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/jcamachott/32/822_2.png) [@jcamachott](https://forum.pinegrow.com/u/jcamachott)\
**Post date:** [October 12, 2019, 1:53am UTC](https://forum.pinegrow.com/t/display-posts-from-a-category-in-the-single-php/823/6 "2019-10-12T01:53:25Z")

</div>

Hi I am trying to do this as well in Pinegrow 5.7 and not getting through. Do I need the custom php code or can it be done completely inside PG?

---

<div class="post-metadata">

**Author:** ![Rob](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/rob/32/9_2.png) [@Rob](https://forum.pinegrow.com/u/Rob)\
**Post date:** [October 21, 2019, 8:33pm UTC](https://forum.pinegrow.com/t/display-posts-from-a-category-in-the-single-php/823/7 "2019-10-21T20:33:37Z")

</div>

@jcamachott have a read of this information about creating [category pages](https://codex.wordpress.org/Category_Templates) on Wordpress Codex it might be useful. Try duplicating your archive/category page and rename it category-name (name being the name of the category you want to display).
