Skip Navigation

[Resolved] PreFilter Archive Results with Custom Field Selection in form on other page

This support ticket is created 3 years, 6 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 4 replies, has 2 voices.

Last updated by Don 3 years, 6 months ago.

Assisted by: Christian Cox.

Author
Posts
#2080405

Don

Tell us what you are trying to do?

I would like to have a simple form on my frontpage, which on submit goes to the archive page with the results filtered based on the values passed. If I understand it correctly, filtering an archive by distance filter is not an option, correct? That would have been ideal but, even if that isnt possible, i would like to filter archive results from a form on another page which includes custom field selections for that post type archive....

I dont see anything in the url of the archive of post type results changing when i use the search filters on the archive page so not sure if this is possible or not.... any ideas how to achieve this? again, is only for ONE specific post type archive, using ideally the distance filter or, when not possible, toolset custom fields for this specific post type archive....

#2080551

Hello, you are correct that distance filtering is not supported in archives, only in custom search Views. Another limitation is that filters can be displayed independently for a custom search View, but not a custom search Archive. Those limitations of filtered WP Archives do not have simple solutions, unfortunately. The current software allows you to split the filters and results of a custom search View, not an archive, and display the filters alone in a separate area. The filter's redirect destination must be a custom Page, not an archive or post. So one way you could work around these limitations is to create a custom Page and insert a custom search View that includes the filters you want, along with the results. This would be the redirect destination for the independent filters, displayed elsewhere. Then in the homepage where you want to display the filters, insert a View block, choose the same View you created in the destination page, and configure the View block to display only the filters with the redirect destination set to the Page you previously created containing the original View with filters and results.

That's probably the most practical way to work around these problems, but it does not truly give you the ability to show an archive's filters in another location. It lets you display a custom search View that acts as an archive, in a separate Page. You could still add custom search filters to your WP Archive, not including the distance filter, and allow your visitors to filter the archive if they arrive at that URL by some other method of navigation.

#2080601

Don

thanks for clarifying, yeah i had looked at originally doing it as you describe, ie a page with a custom search with the option to prefilter the pages search results from a form on home page.... and that works fine, but the problem is that on a custom search view the view search and view output are joined at the hip, and setting up a page with the layout i wanted for the search section, the results section and a map section just wasnt working out. AND, the bigger issue being that an archive is a native part of wp, so why fight the beast and redo what it is already doing in making the archive. And the archive page layout is more flexible than the normal view i have found..... it was just this one lingering issue about possibly prefiltering view results upon arrival. oh well, at least i know its not possible, at least now, so can accept that. and compared to what all toolset DOES offer, which really impresses me more each day, that one little "hiccup" in my plan is ok......

#2080877

Understood, and it is unfortunate that there are some limitations of archives that prevent exactly what you're looking for.

#2080889

Don

My issue is resolved now. Thank you!