Can’t get custom rewrite tag, query var, permastruct (permalink structure), and rewrite rule to work properly together

After a lot of inspection of rewrites happening under the hood by hooking into filters and logging variable values, I managed to solve the problem! Queries and query rewriting When a query occurs, WordPress will serve the content using the correct template as soon as it has enough info to unambiguously determine what the template … Read more