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.
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.
Well done. I had no idea of the problem butits always goodwhen someone posts solutions for others. Cheers
1 Like