My First WordPress Hack
As posted to WordPress Hacks:
Hey. I wanted to be able to see posts that had been “recently modified” as opposed to the date posted. This way I can add entries out-of-order, but still advertise them on my sidebar.
I hacked the
get_archives()
function to add a recentlymod option. You can see the following function call in use under “Recent Posts.”
get_archives('recentlymod', 7);
The hack is available at http://dannyman.toldme.com/scratch/wp-template-functions-general.diff.
Personally, I would like WP to have an admin feature to distinguish between
post_date
andpost_modified
… a toggle I could set somewhere to ensure that my RSS feed was behaving as “Recent Posts” does.
Now I can post stories from my World Tour (still not finished yet!?) and my readers will have a clue that new material has appeared.