I'm struggling to get my WordPress Custom Types to work. I've created a new type, called "Document", registered it with register_post_type() and it works on the admin side... but only the admin side; everything else gives me a 404 with $post == NULL.
Viewing it on the front-end (even while logged in) generates a 404, even without rewriting permalinks, even after flushing rewrite rules, even after changing to default permalinks and back, even after visiting the permalinks page, saving it, and checking my .htaccess file.
Trying to access the post manually doesn't help either: http://mysite.com/?document=test-document also pulls up a 404.
Why doesn't this work? Please help.