Custom URL routes
All internal rewrite rules must point to index.php. This isn’t a theme file, it’s the main bootstrap file in the root of your WordPress install. So, your rule should look like: add_action( ‘init’, ‘wpse26388_rewrites_init’ ); function wpse26388_rewrites_init(){ add_rewrite_rule( ‘properties/([0-9]+)/?$’, ‘index.php?pagename=single-deal&property_id=$matches[1]’, ‘top’ ); } You can then assign the deal.php template to your single-deal page in … Read more