I have two custom post types.
Destinations - destination custom post type has their posts and they are organized in hierarchical mode example:
Each of the destination post it was programmed to look as a page. Inside Rooms post (page) I can select other different custom post types from "Room" custom post type to be visible inside a Room page.
- Room - custom post type, have their details, price, description etc.
Now when I am opening one of the destination page and then I click on Room it will open my room page. URL will be something like:
Now in room page I have all the room custom post types that I have selected.
Now my problem is that when I click on the rooms they will redirect me to custom post type URL example:
My question is how can I change the custom post type url, so when I click on room custom post type to not change the actual URL but just to add room title in URL example to be like:
My problem is that destionation part is dynamic and I don't know how to do that ?
What changes do I need to do to be able to use custom post types in this way ?