[wp-hackers] Complicated Rewrites In register_custom_post_type

Alex Andrews awgandrews at gmail.com
Mon May 9 22:34:21 UTC 2011


Thanks very much for this - I've employed this technique in a plugin I
wrote, but I wondered if there is a newer version of it. In addition, where
in the plugin do you supplement WP_Query? - I guess you don't need to.

All the best.

Alex

On 9 May 2011 23:19, John James Jacoby <johnjamesjacoby at me.com> wrote:

> Rewrite will take whatever you give it. We use a custom front on the
> bbPress plugin.
>
> Here:
> http://bbpress.trac.wordpress.org/browser/branches/plugin/bbpress.php#L291
>
> And here:
> http://bbpress.trac.wordpress.org/browser/branches/plugin/bbpress.php#L814
>
> -JJJ
>
>  ------------------------------------------------------------------------
>>
>>        Alex Andrews <mailto:awgandrews at gmail.com>
>> May 4, 2011 8:47 AM
>>
>>
>>
>> Hi all,
>>
>> Registering a custom post type one uses 'rewrite' to setup simple
>> re-write structures, using slug to simply define where the archive is
>> then where our posts of that type therefore will be. But what if
>> someone wanted something more complicated? Apparently we can pass an
>> array to slug, but how does this work? Say we wanted to pass some
>> clever query variables along and so on or perhaps have /x/y/z with a
>> custom front etc. Is there any codex on this or a good tutorial?
>>
>> Thanks in advance,
>>
>> All the best,
>>
>> Alex
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
>>
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list