WordPress thinks my custom route is a 404
Manually setting is_404 = false; fixed my issue. However I’m not sure this is the best way to do it. I tried using the pre_get_posts filter instead without any luck. Anyway, for anyone else in the same boat, you can do this to get rid of the 404 state: public function add_response_template($template) { global $wp_query; … Read more