Hi
First of all your post relations and editing child from parent is something that i think before starting this project to be perfect for me and i didn't even imagine they could be plugin that could do this. I'm extremely impressed with that:)
I need to display list of all post from one child custom post type displaying custom data from parent post type. I will use real estate example you used. Let say i have 3 villas for rent with total 10 rooms. With custom post fields like that.
Villa (Parent):
Villa name
Adress
square meters
Total Bed rooms
Available Parking space
Pool
ect.
And i have child "rooms"
Room name
Room square meters
Beds
Private Bathroom
ect.
I need to display everything in one table so i will have table like that
Villa Name; Villa Address; Villa square meters; Villa total Bed rooms; Villa Available Parking space; Villa Pool; Room name, Room square meters; Room Beds; Private bathroom
Green Villa, Address 1, 100 meters; 3 bedrooms; 2 privet parking spots; No pool; Bedroom 1; 16 meters; 1 Double bed; Private bathroom.
Green Villa, Address 1, 100 meters; 3 bedrooms; 2 privet parking spots; No pool; Bedroom 2; 25 meters; 1 Double bed and one single; Private bathroom.
Green Villa, Address 1, 100 meters; 3 bedrooms; 2 privet parking spots; No pool; Bedroom 3; 18 meters; Two single beds; Private bathroom.
Blue Villa, Address 2, 200 meters; 5 bedrooms; On street only; No pool; Master Bedroom 1; 45 meters; 1 Double bed and 2 single beds; Private bathroom.
Blue Villa, Address 2, 200 meters; 5 bedrooms; On street only; No pool; Bedroom 1; 25 meters; 1 Double bed; Private bathroom.
Blue Villa, Address 2, 200 meters; 5 bedrooms; On street only; No pool; Bedroom 2; 18 meters; Two single beds; Private bathroom.
ect...
Is it possible?
Paweł
Dear Paweł,
I think it is possible within Views, you just need to create a view to list child "Room" posts, and in the Views loop section, display the information of child "Room" post and it's parent "Villa" information, see our document:
Displaying Fields of Parent Pages
https://toolset.com/documentation/user-guides/displaying-fields-of-parent-pages/
You can also setup a custom search form in above view:
https://toolset.com/documentation/user-guides/front-page-filters/
Hi
This one don't works. I did try:
1. <td>[wpv-post-title id='$parent']</td>
2. <td>[types field="custom-value" id='$parent'][/types]</td>
3. <td>[wpv-post-title id='$house']</td>
It looks like loop wizard can't process "$" values
Paweł
For example, the parent post type "Villa" is using slug "villa", you can display the parent "Villa" post title as below:
[wpv-post-title id='$villa']
See our document:
https://toolset.com/documentation/user-guides/displaying-fields-of-parent-pages/
[types field="xxxx" id="$yyyy"][/types]
Where xxxx is the field of the parent you want to show, and yyyy is the slug-name of the parent. The “$” is required, as this represents a variable where the parent post name will be replaced by the post ID, internally.