Let's say I have a post type "Course" and I have a url structure for them like:
/course/course01
/course/course02
, etc.
I want to add some functionality like course booking but due to SEO/cache and other reason I don't what to use URL params like ?action=book but use URL structure like:
/coursebook/course01
/coursebook/course02
or
/course/course01/book
/course/course02/book
On these pages I want to handle booking process depend on chosen course but also change some page content like title based on the chosen course and it's details.
Thank you for getting in touch. When handling custom URL structures this usually involves some amount of custom code. However looking at the structure below it would appear that /coursebook / would be the slug of the custom post type is that correct?
/coursebook/course01
/coursebook/course02
Then course01 would be the name/title of the actual course correct?
Not exactly, /coursebook/ is the page there I want to handle booking process for chosen course by second part of url such as /course01/ or /course02/
I understand that it should be some custom code. The question is mainly about how to handle part of url as param for page or custom post template to define action or custom post for action.
I understand what you mean now, it would essentially be a Parent/Child breadcrumb in the URL.
Unfortunately given such the case it would require custom coding to rewrite the URL in such a fashion. The custom code required to achieve this is out of the scope of our support forum and as such I would recommend getting a contractor to craft a solution for you.
You can get in touch with any of the contractors that are registered to our site at the link below. https://toolset.com/contractors/