Remove Rewrites and Automatic URL’s
If you want to remove all template redirect rewrites, the following code placed in your functions.php file should take care of it for you (since version 4.2).
remove_action('template_redirect', 'foxyshop_theme_redirect', 1); add_filter('foxyshop_register_post_type', 'my_foxyshop_register_post_type'); function my_foxyshop_register_post_type($args) { $args['public'] = false; unset($args['rewrite']); return $args; }
Posted in: Helpful Code Snippets