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_dateandpost_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.
Comment / Tip
. . . or leave a Tip
Danny Howard is 100% responsible for the content on this site, except some of it is stolen.
All rights are reserved, unless otherwise noted. Generally, I'm a BSD guy, so you can assume implicit permission to adapt, modify, and redistribute my intellectual property with appropriate attribution. Except some of this content is itself re-appropriated, so you'd best ask first, especially for commercial use. Thanks!
You can contact me via e-mail: dannyman@toldme.com
Most of http://dannyman.toldme.com/ is powered by WordPress.
If you're hip to RSS and whatnot, you can subscribe to this site.
These links are for dannyman: login AND backlinks