[wp-hackers] WP_Rewrite query

Scott Merrill skippy at skippy.net
Sun Feb 5 14:33:35 GMT 2006


Sam Angove wrote:
> On 2/5/06, Scott Merrill <skippy at skippy.net> wrote:
> 
>>So, short of asking for someone to write my code for me, I would really
>>like to see a comprehensive example of how to add and use a new
>>permalink token -- assuming such can be done.
> 
> 
> Try this:
>    http://rephrase.net/miscellany/06/dayofyear.phps

Huzzah!  Now that I see a working example, it makes more sense (as well
as drives home the fact that it would've taken me considerably longer to
develop that on my own).

> It isn't a comprehensive example, but it does part of what you want.
> There might be a better place to add the rewrite tag, but that hook
> works. Just use %dayofyear% in the permalink structure in the admin
> panel.

Thanks, Sam!  This is _precisely_ what I needed.  Do you have a PayPal
account?

For those following along at home, here's my revision to Sam's plugin,
which should account for leap years:
   http://www.skippy.net/secret/dayofyear.phps

-- 
skippy at skippy.net | http://skippy.net/

gpg --keyserver pgp.mit.edu --recv-keys 9CFA4B35
506C F8BB 17AE 8A05 0B49  3544 476A 7DEC 9CFA 4B35


More information about the wp-hackers mailing list