Skip Navigation

[Resolved] Adding date range filter applying to child view only on the parent view

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 26 replies, has 3 voices.

Last updated by Luo Yang 3 months ago.

Assigned support staff: Luo Yang.


Thanks. I see you already added everything for us with the new view and in our Rides by Date view.

But the phone field still isn't displaying on the Rides by Date page we've set up to display the Rides by Date view.

hidden link

It's showing a result of "No items found" on all rides except for this one:

Mar 9 Thursday 4:30 pm Bike Intervals – Big Tree Park
Category: A, B, C, D, S Distance(s): 12
Contact: Donna Lyons –
Test Ride Leader - 123456

On that one, it is showing the Ride Contact as Donna Lyons from my original view, but the new view you set up is incorrectly showing the name as Test Ride Leader and is correctly pulling the phone number field from that Ride Leader but it should be pulling the name and phone number from the Donna Lyons Ride Leader post.

I don't know if we need [wpv-post-link] to display in the new view you set up. I think we only need the phone field here, but if that [wpv-post-link] is necessary to be there to establish the relationship in some way, then we can make that field hidden in the display.

I'm not sure at all why what you've done isn't working or why it did produce the lone result that it did on the one ride shown above but showed "No items found" on all the others. I think it may be because of how Waqar showed us how to set up the Ride Contact field within the Ride content type to use the Ride Leader post titles as its selectable options. That complexity allowed us to have the page here:

hidden link

That page is built with these Views:

hidden link
hidden link

But it also seems to be making any additional use of the Ride Contact field or any of the fields within the Ride Leader field group very difficult and way beyond my skill level to even grasp without being shown by you, much less to try to code myself. And based on what Waqar said previously it is also making filtering on these Views in the specifically problematic ways we're trying to accomplish impossible.

I'm still waiting on the decision from my client about these filters. I'm hoping they'll be OK with just eliminating the filters that we can't do here. That will likely be influenced by if we can get this phone field working or not. They definitely need this phone field to display so Ride Leaders can be called prior to Rides. That's 100% necessary. If we get this phone field working then the single question for the client as things currently stand is to see which they consider more important: the functionality for admins to have the Ride Leader Ride Count page ***OR*** the ability for end users to be able to have a filter by Ride Contact on the Rides by Date page. They'd then have to choose between those two features.

Thanks so much as always for all this help.


Luo Yang

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

To avoid more misunderstandings:

Which one is the correct "Donna Lyons Ride Leader post"?
Please point out the post URL?

How do you setup the relationship between "Ride" post and "Donna Lyons Ride Leader post"?


The Donna Lyons Ride Leader post is here:

hidden link

Within the Bike Intervals - Big Tree Park ride here:
hidden link

Donna Lyons was chosen as the Ride Contact. Waqar has helped us to set this up where the Ride Leader content type supplies the options within the Ride Contact field. The reason we need this to be this way is because the Ride Sweep field also uses the Ride Leader content type to get the options. The reason for this is because for the purposes of the Ride Leader Ride Count functionality, we needed counts for each time a Ride Leader is selected as a Ride Contact *OR* as a Ride Sweep. The two positions are equal as far as being included in the count goes. So this is how Waqar advised us to set this up so the count page could be created using the two views shown previously.

The relationship is the Ride content type is the parent and the Ride Leader content type is the child in a one-to-many relationship. That's because each ride can have two Ride Leaders (Ride Contact and Ride Sweep).


However, I now have the answer from my client as to what they prefer and their answer may make this a moot point now. So don't invest any further effort on this phone field yet. The client indicated that having the Ride Contact field as a filter for end users to use is MORE important to them than having the Ride Leader Ride Count functionality. That may mean that we have to give up on this entire effort if what Waqar said earlier is correct. I hope that's not the case partially because we'd still like to have both, but moreso because of the disappointment of this becoming a TON of wasted effort for all of us.

So their response here means that the Ride Contact filter issue now moves to being the one to focus on. If we can't solve that one, then we'll have to scrap this whole thing and I'll then have to restructure everything back to being within the Rides content type and set up in a way where I think I'll be able to handle it all myself from my current level of Toolset knowledge.

The Ride Contact filter issue is as follows.

First go here:

hidden link

On that page, see in the right sidebar that we have Ride Contact as one of the fields that end-users can use to filter. The problem with this is the options within that filter are not populating with the Ride Contacts that have been chosen when the Rides are set up. If you look at the Ride Start County, Ride Start City and Ride Start Name filters, those are all correctly populating with everything defined in the existing rides. But the Ride Contact one is lacking most of the people designated as Ride Contacts. With the first two rides on this page, the Ride Contacts are Karen Mangliardi and Donna Lyons. But they are not present among the Ride Contact filter options. If we see them in the Ride Contact filter options, then I'll know it is working.

If we can get this filter working properly, then we can go back to looking at the phone field. The other problem we're having with applying a filter is not something that threatens having the Ride Leader Ride Count functionality. But this problem makes it to where we'll have to restructure everything back to being within the Rides content type and eliminate the Ride Leader Ride Count functionality altogether if we can't get it working. So there will be no point in solving the phone field issue as I'll then just move that field back to the Rides content type and we won't have to rely on a Relationship with that. I'll be able to get that working myself.

Let me know if you know of anything that can get that Ride Contact filter populating correctly the way this is set up. Waqar indicated that we'd have to move it back to the Rides content type to get that to work, which I'm taking to mean that we won't be able to have the Ride Leader Ride Count functionality after all. I'm hoping you have some kind of logic trick up your sleeve that will get it to work.


Also, I just wanted to offer my sincere apologies, mainly to Waqar, and then to you for what you've done so far here, if all of this turns out to be wasted effort and we can't make the Ride Leader Ride Count functionality work. I'll feel really bad about this if that's the case. I won't be upset about the wasted effort on my end. I'll simply feel bad if it turns out to have wasted a lot of your time. I know Waqar put a lot of effort in this that had my head exploding trying to follow the complexity of everything he did for us. I had no idea it would be as involved as it was when I initially asked the question about it in our first ticket on this.


Back to the Ride Contact filter issue...

I'm not sure what that filter is using to pull the names that are present within it. Note that the options present within that filter are Athena Bouvier, Jay Zajan, Kathie Smith, Ricardo Toro, Ride Leader, Stuart Beal, and Walk Jones. So that filter is correctly pulling those names from somewhere. I believe those are all the names that I had chosen setting up my initial test rides. So it worked fine on those rides. Those were set up before we restructured things to create this Ride Leader Ride Count functionality though. It just isn't working for all the new rides our Director set up after this restructure. So determining how it is working on the older test rides but not working for the newly added rides may yield a solution. Perhaps this problem is simply something not being defined properly.

Another possible approach: We do have custom code that you guys provided previously here:

hidden link


This code pulls the Ride Leader post titles to populate the options in the Ride Contact and Ride Sweep fields present on the Ride edit pages. If there is any way to use this same approach to populate the Ride Contact filter options, that would be fine. We don't need this filter to be limited only to the options that have already been chosen as Ride Contacts for rides. If it lists all Ride Leader post titles as the options and an end user chooses one that hasn't been designated as a Ride Contact for any ride, it should just return No Results Found. That wouldn't be a problem at all. But I understand the filter may not work if it is looking for Ride Leaders instead of Ride Contacts. I'm not clear on how the Relationship works there. Waqar's logic skills there went beyond anything I could think out myself at my level of Toolset knowledge. Once we get into Relationships it's all very confusing to me.

Just let me know if there's any way to get that to work.


Luo Yang

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

According to our support policy, we prefer one ticket one question:

We can handle questions one by one, for the "Contact Phone" issue:
Please edit the The Donna Lyons Ride Leader post you mentioned above:
hidden link
You did not setup relationship between "Ride" post and "Ride Leader", so it won't work as expected result, you need to setup the relationship between them in section "Ride Leader"

Please confirm it, then we can proceed to other issues


This is where I'm confused. I have the relationship between Ride and Ride Leader set up here:

hidden link

Is there more to it than that?

Looking at the Donna Lyons Ride Leader edit page you linked, I scrolled down to the bottom where the Ride Leader section is. I see the Park Hopper ride in there. But that is not correct for that to be there. Karen Mangliardi is the Ride Contact for that ride. Under the Ride Contact field in that Ride Leader section, I'm not seeing any name there. Should I disconnect this Park Hopper ride from the Donna Lyons Ride Leader edit page?

The ride that Donna Lyons is the Ride Contact for is Bike Intervals – Big Tree Park. But that one is not present in that Ride Leader section.

I'm just not understanding what I need to do to make this work. Even if this ends up being work for nothing that we end up having to scrap. I would still like to understand everything with Relationships better, so if you can show me what's wrong here, that would still be helpful towards future efforts I try with this.

I thought the Relationship is established when the Ride Contact and Ride Sweep fields are chosen in the Ride content type. Does more need to be done in the Ride Leader content type to complete the Relationship? I just don't have a firm grasp on Relationships yet.


I'm now thinking I may have made a mistake in setting up the Relationship. I chose One to Many because each ride can have two Ride Leaders. But should I have chosen Many to Many instead because each Ride Leader can and will be the leader for many different Rides?

Is this why there is only one ride in that Ride Leader area on the Donna Lyons edit page and why I cannot click the Add New Ride button?

I'm now seeing what was done wrong. When we set up the Ride, I didn't realize the Relationship is established there in the Ride Leaders section on that edit page. I thought it was established simply by choosing the Ride Contact field using the Ride Leader names. So I need to include that in the instructions for our Director to set up new Rides. I've now set that for the Park Hopper ride using the correct Karen Mangliardi as a Ride Leader and now the phone number is passing correctly to the view. So now I need to do the same for all the rides created by our director and it should be working fine. I'll do that now. This one may be solved now.


Confirmed that the phone field is now working. I did have to change the Relationship from One-to-Many to Many-to-Many and the problem was my lack of understanding of how to establish the relationship that I now fully get. So this one is resolved.

Should I now create a new ticket for the Ride Contact filter issue? Or do you want to break off my previous posts into a new ticket on your end?

I'll mark this one as resolved after I get your reply.

New threads created by Luo Yang and linked to this one are listed below:


Luo Yang

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Thanks for the confirmation, I have created a new ticket for the "Ride Contact filter issue" here:


OK, this issue with the phone field is resolved, but I realized that I started this ticket with the issue about the date range filter. That one hasn't been resolved yet. So should we keep that in this ticket or split it off as well?

The date range filter is an issue on this page:

hidden link

That page is built with two views:

hidden link
hidden link

The parent view is the first one and the child view is the second one. The child view provides the counts of rides where each ride leader is selected in our rides.

The date range filter isn't working on this due to the complexity of what Waqar set up to accomplish this. If we cannot have a date range filter on the page itself for our director to use because it won't work with how Waqar set up the counts to work, then plan B would be to set up a new view for each calendar year. So we'd have a count of 2022 rides separate from a count of 2023 rides, etc. But if one date filter doesn't work then the other may not work either. Please let me know on this.

New threads created by Luo Yang and linked to this one are listed below:


Luo Yang

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

For the "issue about the date range filter", please check the new thread here:

You can close this ticket, and follow above new ticket.