in wordpress the single page is controlled by single.php theme file. I want to put another link on the single page like "Preview". I want this link to be handled by preview.php. preview.php will be stored in theme directory! how to handle this?
usually I do these using init action hook! if the variable exists in the query string, I perform the action! but how to register a custom script to handle a custom link!
the single page link is like ?p=x and the link to preview will be ?p=x&action=preview
thanks in advance