# Category pages with sidebars

**URL:** <https://forum.pinegrow.com/t/category-pages-with-sidebars/3961>\
**Category:** Pinegrow WP\
**Created:** [April 15, 2020, 5:17pm UTC](https://forum.pinegrow.com/t/category-pages-with-sidebars/3961 "2020-04-15T17:17:32Z")\
**Posts on this page:** 3\
**Page:** 1

<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:** [April 15, 2020, 5:17pm UTC](https://forum.pinegrow.com/t/category-pages-with-sidebars/3961/1 "2020-04-15T17:17:32Z")

</div>

I have two categories of articles, CatA and CatB. Each has their own page that lists the posts in each one.

What I need is when I click on an article in CatA, the single post page opens up and has sidebar of other articles of CatA. Same for B. Can this be done in pinegrow or will I need to manually add code?

I was trying single-CatA.php and single-CatB.php but that did not work…got taken back to the home page.

---

<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:** [April 15, 2020, 10:50pm UTC](https://forum.pinegrow.com/t/category-pages-with-sidebars/3961/2 "2020-04-15T22:50:05Z")

</div>

After much tinkering I figured it out. I used an IF in\_category conditional for one sidebar and another one for the other sidebar. Only one single.php page needed. This is fine for 2 or 3 categories but if there are multiple I’d have to come up with something better. I really thought single-categoryslug.php would have worked.

---

<div class="post-metadata">

**Author:** ![schpengle](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.pinegrow.com/schpengle/32/238_2.png) [@schpengle](https://forum.pinegrow.com/u/schpengle)\
**Post date:** [April 16, 2020, 8:09pm UTC](https://forum.pinegrow.com/t/category-pages-with-sidebars/3961/3 "2020-04-16T20:09:41Z")

</div>

Well done. I had no idea of the problem butits always goodwhen someone posts solutions for others. Cheers
