Removing CPT slug from URL results in 404 error for archive page
I have created a CPT with rewrite rules as follows: “rewrite” => array( “slug” => “https://wordpress.stackexchange.com/”, “with_front” => false ), In the functions.php, I have added the following code: function sh_parse_request_tricksy( $query ) { // Only noop the main query if ( ! $query->is_main_query() ) return; // Only noop our very specific rewrite rule match … Read more