I want to create a simple reservation (reservation.php) form for a custom content type (houses), i have created the reservation.php in the theme directory. The question is:
How can i link to this general reservation form from the custom post type and pass the post id via POST or GET, so i can retrieve some information like post title, taxonomy, and so on. A plus would be do this with a nice permalink like mysite.com/lake-house/reservation/
Tell me more
×
WordPress Answers is a question and answer site for
WordPress developers and administrators. It's 100% free, no registration required.
|
|
|||
|
If you have to make it a separate page that's available by visiting a permalink, you have to think what happens when user visits this page directly, without visiting the single post (house) first. If you know how to handle it, the easiest way would be to make the reservations.php it's own page template and just link to that page from within your single post, while adding post ID as an argument. The best way to do this, however, is, like kaiser suggested, include the reservation form in the single post template. |
|||
|
mysite.com/reservation/istead ofmysite.com/wp-content/themes/mytheme/reservation.php? – Tom Sarduy May 6 '12 at 19:55