Issue with custom PHP query
Okay, so I’m working on http://www.jamespickettphotography.com which is using the Black Canvas StudioPress theme.
At the bottom of the home page and individual post pages, there’s a “recent” section that shows thumbnails from all the recent posts.
What I’d like to do is have it so that it only showed thumbnails from the recent posts inside the category that the current post is in. I don’t mind the running history on the home page, but for example, when someone’s in a post in “what she left”, I’d like for the bottom “recent” section to only show the thumbnails for posts listed in the “what she left” category, and nothing else.
The issue I think comes in where I don’t want to have to create a new template every time he adds a new category if I don’t have to. Is there a way to use parent/child/if/something statements ONE time so that I don’t have to create a new file every time he calls me up to tell me he started a new category?? I’m just at a loss for sorting this out right now.
How complicated can this be? I know I’ve probably got the solution buried inside my head somewhere, but I can’t seem to dig it out right now, and would appreciate the help immensely.
- The topic ‘Issue with custom PHP query’ is closed to new replies.