[wp-hackers] Complicated Rewrites In register_custom_post_type

John James Jacoby johnjamesjacoby at me.com
Mon May 9 22:19:05 UTC 2011


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


More information about the wp-hackers mailing list