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.
"/rooms/room-name"
.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: "/room/room-name"
.
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:
"/malaga/rooms/room-name"
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 ?