Skip Navigation

[Gelöst] Not all options displaying

This support ticket is created vor 6 Jahre, 2 Monate. 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 3 Antworten, has 2 Stimmen.

Last updated by zoeS vor 6 Jahre, 2 Monate.

Assigned support staff: Nigel.

Author
Artikel
#462715

I am having some trouble with some filters. On a property website, my search filter includes dropdowns for minimum and maximum price:

<div class="row">
							<div class="col-xs-6">
                              <label>[wpml-string context="wpv-views"]Price Min[/wpml-string]</label>
                              
                              [wpv-control field="property-price" url_param="property-price_min" type="select" values="0,200000,400000,600000,800000,1000000,2000000" display_values="0,€200 000,€400 000,€600 000,€800 000,€1 000 000,€2 000 000"  auto_fill_default="no minimum"]
                            </div>
                            <div class="col-xs-6">
                              <label>[wpml-string context="wpv-views"]Price Max[/wpml-string]</label>
                              [wpv-control field="property-price" url_param="property-price_max" type="select" values="100000000,200000,400000,600000,800000,1000000,100000000" display_values="all ,€200 000,€400 000,€600 000,€800 000,€1 000 000,>€2 000 000"]
							</div>
                          
						</div>

I have a query filter: Select items with field: Price is a number between URL_PARAM(property-price_min), URL_PARAM(property-price_max)

The results are displayed in a page.

I need to use the "Show only available options for each input" because of various other fields that I'm searching on.

It works perfectly for the first search, but then once that search has been made, the only values available in the minimum price dropdown will be those that are equal to or lower than the previous search value. I need all of the values to be available at all times but using "Show only available options for each input" doesn't work for me because it also shows options for properties that are not published, which I don't want.

Thanks

#462762

Actually I think I was coming at this from the wrong angle. "Always show all values for inputs" will work perfectly in this case if I can find a way to show the property types (a taxonomy) that exist only in published properties. Is this possible? I am already hiding the empty ones in the shortcode, but where there are proeprties in draft, the taxonomy is not empty.

[wpv-control taxonomy="property-type" url_param="wpv-property-type" type="select"  hide_empty="true"]
#462827

Nigel
Supporter

Languages: Englisch (English ) Spanisch (Español )

Timezone: Europe/London (GMT+00:00)

Hi Zoe

I'm having problems reproducing this. The hide_empty attribute is working as expected for me.

I have a custom post type with a custom taxonomy assigned, and several sample posts with associated terms. I have one post with draft status that has a taxonomy term that isn't used anywhere else.

My search view has a filter for this taxonomy, and the search settings are to "Always show all values for inputs".

With the hide_empty="true" attribute in the filter shortcode, when I visit a page with the search form on the front end, my taxonomy dropdown does not include the term of the draft post. If I remove the attribute and reload the page then the taxonomy term of my draft post is included in the list.

I'm using the latest versions of our plugins. Could you please update yours (they appear to be one version behind current) and check again?

If so, I need you to do some testing.

To identify whether this is a Toolset issue, a compatibility issue, or a 3rd party issue, could you please switch to a standard theme such as twentysixteen and re-test, and try disabling all non-Toolset plugins and re-test.

If the latter resolves the issue the re-enabling the plugins one at a time (or in batches) should make it possible to identify where a conflict is coming from.

Please let me know how that goes so I can see how to proceed, thanks.

#462846

HI Nigel

Thanks so much for your help. The problem is still there with up to date plugins, but it looks like there is something more complicated going on, since when I view all of the property types, there are a few where they show that there are one or two properties in the count column, but then when I click, there are none to see. There has been so much swapping and changing and importing and meddling going on with this site, I think I just need to try and tidy the taxonomies up and see if it sorts itself out. I'll start another post if the problem persists, but you're right, for now it's not actually the views filter that is the problem.

Thanks again
Zoe