[wp-hackers] WP_Rewrite query

Andy Skelton skeltoac at gmail.com
Sat Feb 4 23:27:30 GMT 2006

On 2/4/06, Scott Merrill <skippy at skippy.net> wrote:
> I'm late to this discussion, because I've just realized that I'd like to
> use a custom permalink structure for a project.  Specifically, I want to
> use semi-Julian dates (date('z') in PHP).  I see how to insert the
> query_var, and the regex is easy enough (/\d{3}/)m but I don't see how
> to get in to manipulate WordPress' date variables.

Once you've gotten your query var into $wp->query_vars, you can filter
'query_string' (classes.php line 1662). This is only one way to do it
but it's the first one I thought of. Take your date out of the query
string and replace it with the WP-recognized one.

Buy me a beer,
Andy :-)

More information about the wp-hackers mailing list