Skip Navigation

[Resolved] filter based on child parameters

This support ticket is created 6 years, 8 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
- 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 -
- 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Tagged: 

This topic contains 7 replies, has 3 voices.

Last updated by Noman 6 years, 8 months ago.

Assisted by: Noman.

Author
Posts
#618363

In tribe events calendar plugin - i have a post type "event" wich i make for him a parametric search view
This "event" post has a child (defined by the events plugin ) called "venues"
Inside venues we have "city" field.
i would like to add to my "events view" a parametric search for the child post filed city - meaning to filter events by his city (defined in venues child)
is it possible?

#618499

??????

#618545

anyboody home???????????

#618563

Hi Meirk,

This is not possible natively as the "Events" and "venues" post types are not created an managed by Types.

But, we offer something that would help in that.

We have an API for the Views plugin: https://toolset.com/documentation/programmer-reference/views-filters/

For example, you can use the wpv_filter_query filter to edit the query that will run in the view and do whatever you want.

So, what I recommend you to do , in case that you can code PHP is:

Inside you main View (The view that contains the main parametric search), Create another view that lists the cities and use this View to generate a select field.

Then, you can use this select field to play with wpv_filter_query afterward in your functions.php

Thanks.

#618572

bsd

i'm not a php programmer
could you help me and be more detailed?
thanks

and also - if this two posts would be controlled by toolset - ( i saw a toolset ticket explaining how to get in control of other custom posts) what shoul be be solution?
Does parent - child relations work the same way in tribe events calendar and toolset?

#618739

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

backend-view.png
frontend.png

Hi,

Thank you for contacting Toolset support.

I have reproduce it using Toolset with same setting as you have in Event calendar plugin. I have created Event CPT as parent, Venue CPT as child with City select field. Then i created parametric search view for Venue CPT as in attached screenshot. In search results, we can display venue or it’s parent(Event) by city name as in attached screenshot.

Thank you

#618748

bsd

thanks
I understand this is possible while defining both venues and events with toolset plugins.
But i would like get the same result using venues and events from events calendar.
I wnat to be able to display the vents in calendar form - so i need to build my view based on their cpt's
is it possible?
I see i can filter events by his categories and also by a toolset cpt that i built like parent of events called "instructors"
hidden link
but even knowing the venue city slug (activated by frontend toolset setting option - _venueCity i cannot filter by it.
also i cannot run a "venue" view (from envents calendar plugin) and filter it by city
hidden link
but i cannot call all "events parent" fields from this view.
Any ideas?

#618902

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hello,

Unfortunately this is not possible using built-in features of Toolset. But if you want to give it a try with custom solution then please note this requires a custom code or modifications which falls into Custom coding & custom development and it is out of support policy (https://toolset.com/toolset-support-policy/). So we recommend to contact Toolset recommended service providers to further discuss the custom approach. We have some recommended list of service providers here if you would like to take a look: https://toolset.com/consultant/

Thank you