WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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/

share|improve this question
Simply include the file in your template. Then read deeper into ajax on how to do such request in an elegant way. – kaiser May 6 '12 at 19:07
Any idea how can i call this page in an elegant way like mysite.com/reservation/ istead of mysite.com/wp-content/themes/mytheme/reservation.php? – Tomás Ramírez May 6 '12 at 19:55
This is about rewrite rules and permalinks and has got nothing to do with your question or what I wrote above. – kaiser May 6 '12 at 21:31
that´s the plus of my question... check last sentence ;) – Tomás Ramírez May 6 '12 at 22:09
Yea, but there's no plus for questions over here. Please split your questions into two, if they're not on the same topic. Thanks. – kaiser May 6 '12 at 22:12
up vote 1 down vote accepted

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.

share|improve this answer
yes, i handle the case when a user visit the page directly, the problem is that the form is too long and has it owns js libraries, thats why i consider do this in a different page ;) – Tomás Ramírez May 7 '12 at 5:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.