Custom Post Type redirects to 404 page

This function from dev4press really helped me debug my custom post type redirect to a 404 page.   Place this code in your functions.php file: function dev4press_debug_page_request() { global $wp, $template; echo '<pre>!– Request: '; echo empty($wp->request) ? "None" : esc_html($wp->request); echo ' –>'.PHP_EOL; echo '!– Matched Rewrite Rule: ';…

Skip to toolbar