Skip Navigation

[Gelöst] How to display always all options in a Parametric Search Filter

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem:
How can I display a paramteric Search with always all options available, even if no posts matches the criteria?

Solution:
It's possible for Taxonomy Filters on a fine tuned base (each filter), and in a general setting for other Filter Kinds.

When you insert or edit such a Filter, you have 2 options:
- Include - list terms even if no post uses them
- Exclude - only list terms which are assigned to posts

Additionally you can set the general Parametric Search Settings to:

Let me choose individual settings manually

In the section

Which options to display in the form inputs

you are then able to hide or disable the not "existing" values (if no post matches the value chosen), or always show all.

Relevant Documentation:
https://toolset.com/documentation/user-guides/front-page-filters/

This support ticket is created vor 8 Jahre. 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.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Dieses Thema enthält 5 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Eric vor 8 Jahre.

Assistiert von: Beda.

Author
Artikel
#398265
SELECTION.gif

When selecting a value from a parametric search select field, the field resizes to accommodate the width of the selection and the entire width of the parametric search changes.

How can the width of the select fields remain the same so that the field doesn't resize?

#398411

That's rather weird.

Usually the Search handles (select) will render according the widest argument in them
And stay as wide as they initially rendered, not dynamically adapt to your choices.

Specially to your screenshot, to me it seems, the actual changed Handle stays as is, but the empty "City" one is resizing, and only that one.

That tells me, most probably you have no Cities matching the parameter of the Search handle "Category"

Is that the case?

Otherwise I'll need to login and see how you coded that Parametric Search and it's HTML.

BTW; I strongly recommend Bootstrap to nicely arrange the Search handles along your row, so to keep them nicely distanced one form another and also determine their positions

Thank you

#399027

1. This does not happen with all search parameters and it's due to the available options in the other fields, depending on what you choose in the "category" field

I see it's mainly the Costs Field that acts the option Free & Paid and uses more space

2. You can fix the width of the handles or you can use the Filters to always show all inputs - then the inputs always are there and will always produce the same wide filters.

This will though not be possible in this "costs" field case, so there you will need to use a fixed Width.

You can add this inline as you already add the the margin.

#399270

Thank you Beda, how can I use the filters to always show all inputs? I didn't see a setting for it when I added the taxonomies and post fields.

For example, in my Parametric Search Filters, I used the following shortcode for the location taxonomy:

[wpml-string context="wpv-views"]City:[/wpml-string] [wpv-control taxonomy="location" url_param="wpv-location" style="margin-right: 6px;" type="select"]
#399452
Bildschirmfoto 2016-05-18 um 16.40.50.png
Bildschirmfoto 2016-05-18 um 16.40.37.png

It's only possible in Taxonomy Filter GUI.
It will ask you:
- Include - list terms even if no post uses them
- Exclude - only list terms which are assigned to posts

Additionally you can set the Parametric Search Settings to:
"Let me choose individual settings manually"
In the section "Which options to display in the form inputs" you are then able to hide or disable the not "existing" values (if no post matches the value chosen), or always show all.
"Show only available options for each input"
"Always show all values for inputs"

See also screenshots.

Anyway I think with the fixed width you are good to go.

#399686

Thanks Beda. Your solution worked. 🙂

Dieses Ticket ist jetzt geschlossen. Wenn Sie ein Toolset Kunde sind und Hilfe benötigen, eröffnen Sie bitte ein neues Support-Ticket.