[wp-hackers] Custom Post Types Clean-Up

Dobri dyordan1 at ramapo.edu
Mon May 20 20:55:48 UTC 2013


I might be missing something but I've been doing a lot of custom post_types recently and clean up seems to be a huge pain. Here's the deal:

I have a plugin that uses register_post_type in an init hook to do the initial setup of a post type (call it "custom").
Let's say for argument's sake I wanna focus on a page - http://mysite.com/custom/potato/.
I type that in before ever enabling the plugin and it's a 404.
I enable the plugin, play around with it, create a potato page.
Now http://mysite.com/custom/potato/ links to that page and all is good.
Now I disable the plugin.
I try http://mysite.com/custom/potato and now instead of a 404, I get the home page displayed while the url stays the same.
In fact, http://mysite.com/custom/[anything]/ will also result in the homepage being displayed without modifying the url.

Question: Is it just my setup and I should start disabling stuff or is that normal behavior? If it is, shouldn't we do something about it?


More information about the wp-hackers mailing list