I've been trying to figure out a way to list posts (within specific categories) in a sidebar on individual (single) post views.
Basically, when a post is viewed through "single.php", I'd like to be able to have a sidebar that lists other posts in that same category. I already have conditional tags running in the sidebar, but using "in_category()" doesn't work (without returning a "Missing 1 Argument" error).
Here's an example:
The categories might be:
<ul> <li>Pets <ul> <li>Cats</li> <li>Dogs</li> <li>Birds</li> </ul> </li> </ul>
If someone selects "Dogs" they'll, of course, get all the posts in the "Dogs" category and it's easy to have all the posts of the "Dogs" category display in the sidebar of that "Dogs" section (using the "is_category" tag). But, if the visitor views an individual posts through its permalink, I can't figure out a way to get the sidebar to still display the list of posts within the "Dogs" category.
I hope this makes sense. I've searched & searched. No luck thus far.