Skip Navigation

[Resolved] Creating a view that queries by date and shows parent field

This support ticket is created 6 years, 10 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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by MichaelW8226 6 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#604510

Tell us what you are trying to do?

I'm trying to create a schedule view that lists the bands that are playing on that day and shows the start-end time plus the bands name.

I have 2 post types:

- Bands (Parent)
- Shows (Child)

I set up a view that queries for the stage which works great. Then the date based on the start_time datetime field. This doesn't seem to work at all, I can't figure out how to make it query a specific day. In this case July 1st 2018.

The second problem is I set up a view for Band Name which should grab show's parent and add it to the output but when I choose query by current post in the loop. It turns no results. I've tried every option to get it to work and nothing.

Is there any documentation that you are following?

https://toolset.com/documentation/user-guides/filtering-views-query-by-date/
and
https://toolset.com/documentation/user-guides/filtering-views-query-by-post-parent/

Is there a similar example that we can see?

You can see the website but my goal is to list the info like this

Day 1 Main Stage:

6:00 pm - 7:00 pm
Mental Fiction

7:00 pm - 8:00 pm
Another Band

What is the link to your site?

hidden link

You can use my login to get into the website
michael // helloworld

Please let me know how to configure the views correctly. I'm in a real time crunch to get this working.

#604620

Dear Michael,

It is not safe to share your website credential publicly,
I setup a demo in your website:
hidden link
filter with:
Custom field filter:
a) Start Time is a UNSIGNED between DATE(1, 07, 2018), DATE(2, 07, 2018)
b) Stage is a string equal to VIEW_PARAM(stage)

Then put it into the page:
hidden link
[wpv-view name="creating-a-view-that-queries-by-date-and-shows-parent-field" stage="Main Stage"]

See the result here:
hidden link

More help:
Date Filters
https://toolset.com/documentation/user-guides/date-filters/

#607282

This worked out perfectly! Thanks!