Skip Navigation

[Resolved] Using URL parameters in a filter

This support ticket is created 4 years, 1 month 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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 4 years, 1 month ago.

Assisted by: Luo Yang.

Author
Posts
#1888313

I have a simple page with a view that initially show all last names in a Pilots type
I also have user input to accept a last name on which to filter - this works fine
-----
[wpv-filter-start hide="false"]
[wpv-filter-controls]
<div class="form-group">
<label for="wpv-wpcf-last-name">[wpml-string context="wpv-views"]Last Name[/wpml-string]</label>
[wpv-control-postmeta field="wpcf-last-name" url_param="wpv-wpcf-last-name"]
</div>
[wpv-filter-submit name="Search" output="bootstrap"][/wpv-filter-controls]
[wpv-filter-end]
-----
I want to change this to have a URL drive the selection (filter) instead of the user input
I've spent a couple of days researching the documentation but I can't find the solution which imagine is quite simple
The calling URL is "hidden link"

Is it possible to have two parameters
Appreciate your help very much
Les

#1888535

Hello,

I have checked the URL you mentioned above, there are two post views in it:
1) The second one is a map view, the URL parameter works fine, for example:
hidden link
I see only one item in the map

2) I suggest you edit the first post view(ID 711), add the same custom field filter as the second view, more help:
https://toolset.com/documentation/user-guides/views/filtering-views-by-custom-fields/
section "Source for compare value":
URL parameter: The value for the filter is set in the URL to the page