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 the admin interface, or you can use the page_template
filter if you want to apply conditional template loading, like for example only if your property_id
query var is set.