• When registering a post type that is non-public, as in ‘public’ is set to false, why does the ‘rewrite’ argument default to true? With ‘public’ set to false, it’s my understanding that it’s not possible to access the post type from the front end. So why doesn’t ‘rewrite’ default to the value of the ‘public’ argument? Is there some use case I’m not thinking of?

    The current behavior tripped me up recently, when a non-public post type was generating rewrite rules that conflicted with a page slug. For example, if you had a non-public post type called “book”, there would be a conflict when creating a page with the slug /book/moby-dick/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Why does a non-public post type create rewrite rules?’ is closed to new replies.