Skip Navigation

[Resolved] Views: Display a Post type within a Post Type Dynamically

This support ticket is created 2 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 2 replies, has 2 voices.

Last updated by Adrian Robbins 2 years, 7 months ago.

Assisted by: Shane.

Author
Posts
#2365849
notes_filed.jpg

We are developing a WebApp for an annual major UK Golf event, and for this year our client has over 400 bookings.

A section of the WebApp (see screen print) displays the daily itinerary for each booking and you will see we have an Important information notes field, which we have circled in green.

The problem is, if there is any change to this Important Information, which there almost certainly will be, then our client must change ALL of the 400 bookings to reflect this new information, and not ALL bookings have the same information.

Therefore we are wondering if there is any way that we can hive off the Important Notes field, to a new Post type (single WYSIWYG field) and then bring this information in dynamically below the standard information.

We are using a Repeatable field Group for the itinerary days, and then a content template to display then in the Views Loop.

So what we need in the Loop, is for the datafields from the Bookings Repeatable Group to display (we have this working already) and then to slot in below the single WYSIWYG field from the new Important Information post type.

Assuming this is doable, we would like to have a range of Important Notes (most are applicable to the hotel package the client has booked) and display them dynamically.

So when you are entering the daily itinerary for each of the 400+ bookings, you'd select the specific note to display for that day and hotel combination.

The link to the site is - hidden link

You can then login using:

Booking ID : 221234
Lead Party Surname: 301060

Then from the menu, select Itinerary

For this booking you will see it's a 5 night booking and we want the Important Notes single field to be displayed below the other fields for each day.

#2365995

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Adrian,

Thank you for getting in touch. Let me see how best I can assist here.

Therefore we are wondering if there is any way that we can hive off the Important Notes field, to a new Post type (single WYSIWYG field) and then bring this information in dynamically below the standard information.

You can actually do this with a post relationship. So you will create your second post type and offload your important fields to that post type. Then the user can add their data to that second post type and relate it to the Main post type. This way the main post type can be edited independently of the second post type.

It should be noted that when you add the fields to the second post type the data from the parent won't copy over and you must link that second post to its parent.

Essentially you should be able to achieve this with the post relationships unless i'm misinterpreting.

Thanks,
Shane

#2366507

My issue is resolved now. Thank you!