Skip Navigation

[Resolved] Filtering Posts on click, without filter options disappearing

This thread is resolved. Here is a description of the problem and solution.

Problem:

The issue here is that the user has their views parametric search, however once they select an option, their other filter values disappear

Solution:

I suspect that this is a case where you have this enabled in your custom search settings.

To disable this go to Custom Search Settings -> let me choose individual settings manually -> Which options to display in the form inputs then select "Always show all values for inputs" See Screenshot

If you are not seeing this section, scroll to the top of your view and click "Screen Options" in the top right hand corner and enable it.

This support ticket is created 5 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 12 replies, has 2 voices.

Last updated by melaniS 5 years, 10 months ago.

Assisted by: Shane.

Author
Posts
#1230062

Tell us what you are trying to do? I'm trying to work out how to create a filtering system similar to this site: hidden link

When you click on any of their buttons, it changes the items underneath, but the actual buttons stay there so you can change again easily.

I've worked out how to make checkboxes look like buttons, and for the buttons to be clickable to submit, but when ever you click one, the other options disappear...

Is there any documentation that you are following? LOTS of googling, reading over your documentation, support forum posts from the past etc

Is there a similar example that we can see? hidden link

What is the link to your site? hidden link

#1230077

Shane
Supporter

Languages: English (English )

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

Screenshot 2019-04-12 at 9.54.35 AM.png

Hi Melani,

Thank you for contacting our support forum.

I suspect that this is a case where you have this enabled in your custom search settings.

To disable this go to Custom Search Settings -> let me choose individual settings manually -> Which options to display in the form inputs then select "Always show all values for inputs" See Screenshot

If you are not seeing this section, scroll to the top of your view and click "Screen Options" in the top right hand corner and enable it.

Please let me know if this was able to resolve the issue for you.

Thanks,
Shane

#1230084

Hi Shane,

Thank you for that. That solved the issue of having the other options remaining.

I did notice however, when I click on one, then go to select another, it shows "no results", when they're should be a result.

For example, I have a "test" one that's under Mechanic.
And then another one under Graphic Design.

When I click mechanic, the test one shows. Then if I select graphic design, it says no results.

You can test that here: hidden link

#1230089

Shane
Supporter

Languages: English (English )

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

Screenshot 2019-04-12 at 10.08.46 AM.png

Hi Melani,

I tested this but it seems that you have resolved the issue. However I suspect that your filters were using an AND logic to do the filters.

This means that only if you selected Mechanic and Graphic design from the filter, only posts that have Graphic Design and Mechanic selected will display.

I would suggest switching from an AND logic to an OR logic. This can be done by editing your query filter section. See Screenshot

Please let me know if this helps.
Thanks,
Shane

#1230096

Hi Shane,

Where do I find that section in the screenshot?

I did put ClearFilter() in the "will run before getting the new results" in Javascript settings (first screenshot you shared), however when I go back into it, that's disappeared.

#1230106
Screen Shot 2019-04-13 at 1.21.06 am.png

This is the only comparison field I can find...

#1230114

Shane
Supporter

Languages: English (English )

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

Screenshot 2019-04-12 at 10.27.33 AM.png

Hi Melani,

The Query Filter Section of views. It should be below the ordering section of you view. See Screenshot

Secondly the reason why your ClearFilter() function might not be working after the filter is that its quite possible that it's not added to the views callback but please try the solution with the query filter.

Please let me know.
Thanks,
Shane

#1230156
Screen Shot 2019-04-13 at 2.04.50 am.png

I don't seem to have that section 🙁

#1230162

Shane
Supporter

Languages: English (English )

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

Hi Melani,

What is happening is that this section isn't enabled.

Go to Screen Options in the top right hand corner and enable the query filter section.

Please let me know if it shows up then.

Thanks,
Shane

#1230339
Screen Shot 2019-04-13 at 1.51.14 pm.png

Hi Shane,

Sorry, where do I enable it? I don't have the screen options when I click on the layout editor section

#1230997

Shane
Supporter

Languages: English (English )

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

Hi Melani,

I see that you are doing it from the edit Layouts page. However to get access to the screen options settings you must go to Toolset -> Views and find the view that you are using in the Layout.

This way you can set the display options.

Thanks,
Shane

#1231298

I ended up getting it all to work 🙂

#1231299

My issue is resolved now. Thank you!