Passer la navigation

[Résolu] Using URL parameters in a filter

This support ticket is created Il y a 4 années et 7 mois. 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 -

Fuseau horaire du supporter : Asia/Hong_Kong (GMT+08:00)

Marqué : 

Ce sujet contient 1 réponse, a 2 voix.

Dernière mise à jour par Luo Yang Il y a 4 années et 7 mois.

Assisté par: Luo Yang.

Auteur
Publications
#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 "lien caché"

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:
lien caché
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