Site icon Hip-Hop Website Design and Development

Relationship between set rewrite flag in register_post_type and add_rewrite_rule

In register_post_type, I can register a customized publish sort and set parameters, together with rewrite. Primarily based on https://developer.wordpress.org/reference/features/register_post_type/#rewrite, if it set to true, then the rewrite for one of these publish might be dealt with.

Then I add some rewrite guidelines for the customized sort of publish by invoking add_rewrite_rule in custom_rewrite_basic perform.

Nonetheless, on my checks, I discover even I set rewrite to false, the rule set by add_rewrite_rule will nonetheless work, why?