Change the properties of a custom post type after it’s been registered?
While it’s possible to manipulate CPT data after registration it’s not very “clean” and harder for some things. Specifically for hierarchical setting registration adds it to rewrite right away: if ( $args->hierarchical ) add_rewrite_tag( “%$post_type%”, ‘(.+?)’, $args->query_var ? “{$args->query_var}=” : “post_type=$post_type&pagename=” ); else add_rewrite_tag( “%$post_type%”, ‘([^/]+)’, $args->query_var ? “{$args->query_var}=” : “post_type=$post_type&name=” ); So you’ll have … Read more