Skip Navigation

[Resolved] How to filter from URL param

This support ticket is created 5 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 15 replies, has 2 voices.

Last updated by Christian Cox 5 years, 8 months ago.

Assisted by: Christian Cox.

Author
Posts
#1246523

Hello
I made a view wich is filtered by a URL param.
How can I change the url via something like a select?

Thanks

#1246590

You can use the Search and Pagination panel in the View editor screen to insert custom filters, including select fields. Your filters can filter by taxonomy term, or custom field value, or several other criteria. If you cannot see the Search and Pagination panel in the View editor screen, scroll to the top right corner and click "Screen Options". You can enable this panel here, then add new filters in the Search and Pagination area.

Note: If you already created a Query Filter for updating the results via URL parameter, you should delete that filter before you create a new filter in Search and Pagination. It will be re-added automatically using the correct attributes.

Then you can choose different options for updating the search results. One of those options updates the results whenever an input changes. This might do what you're looking for.

#1250653

Thanks but I have a taxonomy view and nested in it a post view...
I need to filter the posts but in the taxonomy view I can't use the search filter...

How can I do?

#1251957

Usually it is not possible to have a custom search View nested inside another custom search View. Can I look at your site to see what you want to accomplish? It might help me give you some suggestions.

#1251959

Absolutely, you should already have the credentials (i gave for another ticket)

#1252319

Where can I find the nested Views on your site?

#1252663

Hello,

the view "archivio-area" contains "pacchetto-area" view,
"pacchetto-area" contains "raccprof-da-pacchetto-area"

I need to filter RACCOMANDAZIONI PROFESSIONISTA from "raccprof-da-pacchetto-area" view

Thanks

#1253125

Okay thank you. As I said before, it is not possible to have a nested custom search inside the results of another custom search. Instead, you could have one set of custom search filters at the top of the page. You must include a Submit button, and you must not use AJAX. The page must reload. Then the URL parameters should be updated automatically, and the nested Views should work correctly.

If this sounds okay, I can give you some advice to make it work.

#1253127

YEs! that would be perfect, thanks a lot

#1253481

Okay here are the steps.
1. Create a new View and choose "Full custom design" in the popup window. This new View will be used only to display the filters, not display results. Choose any post type in the Content Selection area, it does not matter which one you choose.
2. Scroll down to the Search and Pagination editor. Add the taxonomy or custom field filters you want to include here, and set them up to respond to URL parameters. Be sure to add a "Submit" button. It is required.
3. Insert this View in the page just above the archivio-area View. When you insert the View, display only the search form. Do not show the results.
4. Edit the Query Filter in the Pacchetto da Area View. It should be set to use a URL parameter identical to the URL parameter used in step #2.
5. Edit the Query Filter in the Racc Prof da Pacchetto Area View. It should be set to use a URL parameter identical to the URL parameter used in step #2.

Let me know if you have problems and I can take a closer look.

#1254067

Thanks! It looks perfetct.
I'll try today and I'll tell you.

With this method, is there a way to have a search text input that filter on a custom field?

Thanks a lot

#1254109

Sorry Christian just a question about the filtering you told me about...
If I need to filter for AREA (PACCHETTO taxonomy), how can I do it?

In my scheme "archivio-area" -> "pacchetto-area" -> "raccprof-da-pacchetto-area"
I can't filter archivio-area cause it's a taxonomy view neither I can't filter pacchetto-area cause it receive the area from the upper view...

How can I do it?

#1256771

With this method, is there a way to have a search text input that filter on a custom field?
I solved this one creating a text-input filter on the custom field.

Still need to filter for AREA (PACCHETTO taxonomy).

Thanks

#1257059

Still need to filter for AREA (PACCHETTO taxonomy).
There is still no way to implement a custom search filter in a taxonomy View. You can add a front-end filter to a View of posts, but not to a View of taxonomy terms. This would require custom code.

#1257899

This would require custom code

Ok thanks.
Do you have some kind of document or link about it?