I have 2 Post Types
Parent -> Hotels --- Custom Field -> Country
Child of Hotel -> Rooms
I have created views for Rooms to display all the rooms.
Select posts that are children of the Post with ID set by the shortcode attribute wpvprchildof.
eg. [wpv-view name="view-name" wpvprchildof="123"]
I'm not sure what you are trying to do: specifically why you are hard-coding the hotel using a shortcode attribute.
Let's put aside what you have done so far for the moment.
I understand you have a parent post type "hotel" with a field "country" and a child post type "rooms", i.e. rooms belong to a particular hotel.
Can you describe what you are trying to display?
The typical scenario would be that you want a search form where users select a country and the list updates to show hotels in that country, while showing the rooms belonging to each hotel.
You clearly want something different. If you can explain what, I can help you set it up.
Thanks Nigel. I guessed it absolutely right. I wanted to give as much as details but ended up complicating things.
I understand you have a parent post type "hotel" with a field "country" and a child post type "rooms", i.e. rooms belong to a particular hotel.
The typical scenario would be that you want a search form where users select a country and the list updates to show hotels in that country, while showing the rooms belonging to each hotel. I know this should be very simply task with Views but I just couldn't get it working.
OK, so for this on my local site I have set up a CPT for Hotels and a child post type of Rooms, and the Hotel post type has a custom select field for the country, and I created a few sample posts.
Then I create a new View, choosing the option for a custom search View.
The View will display Hotel posts,
In the Filter Editor I insert a filter for the country custom field.
In the Loop Output section for now I just output the post title as a link.
If I add this View to a page and visit the page I will be able to search my hotels by country.
Now I create a second View.
This View will be a simple View that displays all results and which queries Rooms.
I add a Query Filter to only show Rooms that are children of the current post in the Loop (see screenshot).
I then add some fields to display in the Loop Output section.
Now I return to my original View of Hotels, and edit the Loop Output section.
Using the Fields and Views button I insert my second View within the wpv-loop tags where I want the info from the rooms to appear.
You can see the (crude) results in the screen recording.