Custom rewrite rule, url returning 404
I think I figured it out… almost. I needed to use WordPress’ own rewrite engine to define the rewrite rules so it recognizes what I’m doing. So I added this to my WordPress theme’s functions.php: add_action( ‘init’, ‘init_custom_rewrite’ ); function init_custom_rewrite() { add_rewrite_rule( ‘^show/([^/]*)/([^/]*)/?’, ‘index.php?page_id=2382&id=$matches[1]&n=$matches[2]’, ‘top’ ); } add_filter(‘query_vars’, ‘my_query_vars’, 10, 1); function my_query_vars($vars) { … Read more