Skip Navigation

[Resolved] filter results

This support ticket is created 5 years, 9 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Tagged: 

This topic contains 19 replies, has 3 voices.

Last updated by martinP-13 5 years, 8 months ago.

Assisted by: Beda.

Author
Posts
#1198494

this page here i would like to add a filter ,to show only what gets selected , on page load i want all the details showing. above where the info is shown i want to add a filter so that people can filter and show only there required views.

this page here hidden link (and all the other /dogs/etc....)

the filter would allow me to filter , stake,,date of event, events,placement,the panel of judge and the judge
the page hidden link uses the following view ,
'[wpv-view name="view-to-show-all-events-related-to-adog"]'

in this theme file /public_html/wp-content/themes/simply-responsive-cp/single-dogs.php

i tried adding a stake to filter with no joy!!

#1198698

Shane
Supporter

Languages: English (English )

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

Hi Martin,

Thank you for getting in touch.

We would need to see if this one is possible, so the filters will need to be done based on the relationship since you have a complex relationship working with.

I dont remember exactly what the items on the site are like, would you mind providing me with the credentials once more .

Thanks,
Shane

#1198909

any idea shane?

#1198910

Shane
Supporter

Languages: English (English )

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

Hi Martin,

I looked at this for you in some detail and it won't be possible to filter this based on what I can see.

This is because the fields that you want to filter for are not on the intermediary CPT . Now the main issue is that you are not able to filter for the fields that are in a relationship to this post.

The most you can do is to filter for it's parent but that filter is already being used as a static filter to display the information of the items being displayed.

Thanks,
Shane

#1200288

hi shane could you please assign this to beda ? https://toolset.com/forums/topic/cant-type/page/2/#post-1200286 thakyou very much

#1200638

thankyou shane !!

#1200825

Hi @martinp-13 and thank you, @shane-c, for passing the ticket to me. I think I may have a solution to the issue here however as well hope I did not misunderstand the requirements as a negative result was found at first by you.

FYI, it may still not be possible, I, however, think to understand this is possible to achieve, see below.

1. "this page here i would like to add a filter ,to show only what gets selected , on page load i want all the details showing. above where the info is shown i want to add a filter so that people can filter and show only there required views."

It sounds like a View is required, which has a Query Filter that pre-sets some queries, and then as well has a Front End Search to search thru those limited results.

I understand this should happen here:
hidden link (and all the other /dogs/etc....)

2. "the filter would allow me to filter , stake,,date of event, events,placement,the panel of judge and the judge"

Again this sounds like #1, we have a View, listing Judges and/or Events, on a Dogs Post.
Of course, it should only display Judges and/or Events related to the single Dog but still let the user search thru those limited results by filtering for stake, date of event, events, placements, etc.

3. This should be perfectly possible, by following these steps:

- Create a View that lists the Post Type you want to FILTER. So if you want to search thru related Events of a Dog, you need to list Events. If you want to filter Judges, you need to list Judges.
Not the intermediary Post Type as it is done now.
- Then, a Query filter is added to limit the Events and/or Judges to display only the ones related to the post where this View is inserted to.
- After that, more Query filters could be added to further narrow down the "standard" list of related Judges or Events on Dog posts.
- Later, a Front End Filter can be added by either of Custom Fields or Taxonomies that belong to the QUERIED object, so, they need to belong to Events if you query Events and to Judge, if they belong to Judge.
You can NOT filter by fields or terms of RELATED posts, this will only be possible in future and it needs to be asked for as a request here: https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/
- Then, you can complete the Loop and here you can display either current data (Event, Judge) or/and RELATED data such as from posts that are related to the one currently being looped.
- Last, the View is inserted to a Dogs Post or better, in a Template, that is applied to Dogs.

I need, to set up an example, to know what exactly you want to Filter (which post type, which field) and what to display.
Then I could set up an example if the above instructions do not suffice to create the View.

#1201810

option 1,thanks beda i think you have got it spot on from what i can gather is you mean more or less set up an archive and filter from there? , i wouldnt know where to start though... sorry for the late response i didnt see your posts..could you et up an example? hopefully it would do as i would want!! or close enough to be acceptable.

many thanks for your time
martin
option 2 maybe set up an archive for each , dogs events judges stakes etc etc and have a filter on each?

im confused now i presumed toolset would take care of filtering.... i was naive i think!!
thanks again

#1202977

It is described in #3 above how to proceed, step by step.

- Create a View that lists the Post Type you want to FILTER. So if you want to search thru related Events of a Dog, you need to list Events. If you want to filter Judges, you need to list Judges.
Not the intermediary Post Type as it is done now.
- Then, a Query filter is added to limit the Events and/or Judges to display only the ones related to the post where this View is inserted to.
- After that, more Query filters could be added to further narrow down the "standard" list of related Judges or Events on Dog posts.
- Later, a Front End Filter can be added by either of Custom Fields or Taxonomies that belong to the QUERIED object, so, they need to belong to Events if you query Events and to Judge, if they belong to Judge.
You can NOT filter by fields or terms of RELATED posts, this will only be possible in future and it needs to be asked for as a request here: https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/
- Then, you can complete the Loop and here you can display either current data (Event, Judge) or/and RELATED data such as from posts that are related to the one currently being looped.
- Last, the View is inserted to a Dogs Post or better, in a Template, that is applied to Dogs.

Now, if this is not clear, I can set up an example as offered, but as I stated, I need to know what exactly you want to Filter (which post type, which field) and what to display.

Then I could set up an example if the above instructions do not suffice to create the View.

#1203743

if i was on this page here
hidden link

i would want be able to filter just the events that it had 1st place 2nd etc etc
i would want to be able to just show result of certain stakes
i would want to be able to filter just results from an event with a certain judge

i must be missing something because im sure that hidden link does what number 3 describes?
thanks

#1204234

do you think i could accomplish this easier with another plugin , live ajax search plugin for example? because from what i can gather, the pain staking process to get where i am will basically need redoing in a different way....i really dont want to do that!!

#1204236

or maybe even a single page that allows me to filter EVERYTHING ? with the base level being events? either way i really need to make progress here
thx beda

#1205801

should i give up on this beda?

#1206273

No, you shouldn't, I have to apologise for the extremely unusual delay here.
We have had a complex week at Toolset (you surely noticed the updates) and I was totally bound with urgent Bug Reports.

Now, I have more time again for How to's and issues that are not breaking websites at the first attempt of Toolset's usage 🙂

I will be back with you tomorrow, and again I do apologise deeply for the delay.

#1206778

hey no problem Beda !! i've been busy myself, i didn't see the updates!!