[wp-hackers] Custom Post Types and pending incompatibilities

Otto otto at ottodestruct.com
Sun Jul 11 06:09:43 UTC 2010


On Sat, Jul 10, 2010 at 10:39 PM, Jeff Waugh <jdub at bethesignal.org> wrote:
> Slightly different challenge: It's incredibly unlikely that plugin authors
> would want the rewrite root of their custom post type URLs to be namespaced
> in such an ugly way (in public URLs that is -- in code it's fiiiine).

They don't have to be connected, they just default that way. The
register_post_type function takes a rewrite attribute you can use to
override that.

register_post_type ('plugin_whatever', array(
...
'rewrite' => array("slug" => "whatever")
...
));


http://codex.wordpress.org/Function_Reference/register_post_type

-Otto


More information about the wp-hackers mailing list