i create a new post-type in wordpress. The new post-type is called work.
I want to customize the link when the user click "details button".
The link is work/post_id/postname
I have a trouble to connect the link to a details page.
The details page is called single-work.php
In my functions.php I write these rules:
add_action( 'init', 'wpse26388_rewrites_init' );
function wpse26388_rewrites_init(){
add_rewrite_rule( "work/([0-9]+)/([0-9]+)?$", "single-work.php", 'top' );
}
But there is a trouble because when the user click the link, he sees the index.php and not single-work.php. How can I fix that?