Forum Moderators: open
I am making heavy use of categories in my WP-powered site.
So I've ended up with some URLs like this:
http://www.example.com/category/widgets/
http://www.example.com/category/doodads/
http://www.example.com/category/gromits/
Now, I can get an archive of everything from July by visiting this:
http://www.example.com/2008/07/
But what I want is only the articles about doodads from July.
An archive, by date, by category.
Is there no pattern for that?
I might have expected something like this:
http://www.example.com/2008/07/widgets/
http://www.example.com/2008/07/doodads/
http://www.example.com/2008/07/gromits/
or maybe
http://www.example.com/category/widgets/2008/07/
http://www.example.com/category/doodads/2008/07/
http://www.example.com/category/gromits/2008/07/
but no dice.
I've found no mention of this sort of archiving in the codex, and I haven't yet encountered a plugin that solves the problem.
help!
You can create custom templates for just about anything (without breaking anything), so my guess would be that creating a custom archives template could be a start:
[codex.wordpress.org...]
Those can be done from scratch or can just modify an existing template, done in a text editor and uploaded to the theme's content folder. So it might be possible to do by using the get_archives function on a custom archive page, if it takes arguments:
How to pass tag parameters [codex.wordpress.org]
Or the_category_rss [codex.wordpress.org] if it can be date delimited in some way.
Check out the last example in particular.
[codex.wordpress.org...]
How about sharing what you find to help us all out who are trying to figure these things out. Maybe even write a plugin when you get it mastered!
plug-in to generate a list (by category) of all posts
I got started building something custom-made, but gave up after 2 hours when my head exploded in a flurry of gore leaving smears of grey matter sludge all over the screen
I'm positive I could build something like this from scratch, just using SQL to query the database... but I'd really like to do things "right" and work this out within the architecture of the WP codex. So far no luck.
I'm positive I could build something like this from scratch, just using SQL... but I'd really like to do things "right" and work this out within the architecture of the WP codex. So far no luck.
I know what you mean. I ran into something similar recently. It took me 15 minutes to whip up a snippet that did what I wanted to, but after several hours of trying to figure out how to do it within the drupal API, I decided I needed to move on to other things.
Doing things "right" can be so much simpler or so much harder depending on whether the API was designed to allow for what you want to do or not.
That's why I tell people that if you can hire a major contributor to whatever CMS you're working with (i.e. a developer who has contributed core code and complex plugins/modules), it's 5x the price of someone who is an excellent programmer but doesn't know the app. They just don't have to invest all that time in figuring out the "right" way to do it.
-------------------------
"OK. Let's just do this one more time using a method I like to call 'The Right Way'"
-- Rocketman (Disney? movie).