I have a specific issue here. I have website using custom post types, and I need to create a specific functionality for these custom post types. From each custom post type the user should be able to "buy" the product the custom post represents. So my idea is to create programatically additional "page" which would be like %url%/my-custom-post/order/ . And I am looking for the way how to do it.. Adding some rewrite rule..? Searching did not give me a result (maybe I was searching wrong, I am not so sure what exactly to search for..) Thank you for pointing me .. :)
You need to use custom endpoints for it. Read The Rewrite API: Basics article for more information, especially section Add Custom Endpoint.