I have FOOD TRUCKS that arrive at a specific (static) location on each day of the year. I want to set up a view the displays what FOOD TRUCKS will be at that location so visitors can know when to expect the FOOD TRUCKS. I wanted a nice calendar view.. but I will have to wait until you are done developing that, So I went with a list view.
So, I have set up a many-to-many relationship. I guess I could have set up a one-to-many relationship, but I wanted a little more flexibility.
Parent CPT: FOOD TRUCKS
(these are simply the names of the Food Trucks as the CPT title. No other custom fields)
Child CPT: FOOD TRUCK DATES
(These are the dates that the Food Trucks will be at that location. To make it easier on my client, I imported a CSV file of every day of the year.. January 1, January 2, January 3, etc... so my client could easily see the titles then and I created a date as a Custom Field. For convenience and organizing purposes I instructed the client to be sure to choose the custom field date as the same as the title)
Intermediary CPT: FOOD TRUCKS FOOD TRUCK DATES INTERMEDIARY POSTS
I created a single text custom field called FOOD TRUCK HOURS here so that my client could manually type the hours that the FOOD TRUCK would be at the location... For example... 4pm-9pm) See Attachment A
NOTE: I decided not to use the Date-Time Custom Field because it would have required a lot of "clicking and selecting" in order to select the start date and start time and the end date and end time. I just wanted it to be easy for my client... so selecting a single date and manually typing a start-end time in a single text field seemed simpler. If you have another suggestion, I am open to it.
Anyway... after establishing all of the above, I created a View that queried all Food Truck Dates in ascending order by the Food Truck Date custom field and also filtered by only FOOD TRUCK DATES greater than or equal to TODAY().
Then I created my display. I wanted to display
1) The Parent (FOOD TRUCK) Featured Image and Title
2) The Child (FOOD TRUCK DATE)... Date Custom Field
3) The Intermediary Post (FOOD TRUCKS FOOD TRUCK DATES INTERMEDIARY POSTS)... Food Truck Hours Custom Field.
Everything seems to work... except that I cannot get the Food Truck Hours custom field for the FOOD TRUCKS FOOD TRUCK DATES INTERMEDIARY POSTS to display. I have attached my View so you can see. Attachment B
I have also attached the Fields and View selection window that I used to create the shortcode. Attachment C
For some reason, the Food Truck Hours for the Intermediary Post does not display. I can't figure out what I have done wrong and why it won't display.
See Attachment D