Skip Navigation

[Closed] Stars filter only shows one value

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/Karachi (GMT+05:00)

This topic contains 5 replies, has 3 voices.

Last updated by Waqar 1 year, 1 month ago.

Assisted by: Waqar.

Author
Posts
#2674717

In my search filter (hidden link) I have a checkbox with the number of stars. This now only shows a single value and not multiple values if, for example, 2 and 3 stars are checked.

For example:
2 stars checked: result 42775
3 stars checked: result 37368
2 and 3 stars checked: Are not shown result together.

Can this be adjusted somewhere?

#2674781

Nigel
Supporter

Languages: English (English ) Spanish (Español )

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

Hi there

A checkboxes filter normally works with an "OR" comparison, so if visitors check both '2' and '3' then it would show any posts that had either '2' or '3' checked.

When I just checked your site I found that checking '2' alone gave 42936 results, checking '3' alone gave 37529 results, and checking both '2' and '3' gave 42936 results, i.e. the same as checking '2' alone.

That suggests to me that all of the posts which are checked '3' also have '2' checked.

(If this is a checkboxes custom field multiple values can be checked at the same time. If that shouldn't happen and only one option should be checked at a time, you may want to use a radio custom field instead, where you can have multiple options, but only one may be checked at a time. You can still show the filter in a View as checkboxes, so multiple options can be checked when filtering, but the posts themselves would only be able to have a single value.)

#2675723
houses.png

Hi there,

All my houses only have one rating (see print screen) but I will adjust the filter to a dropdown with a minimum rating.
But now the dropdown has the value '0' but I don't have houses with the value '0'.

Is '0' shown if there is no rating?
And is it possible to not show '0' in the dropdown?

#2675747

Hi,

Thanks for writing back.

If I understand correctly, you're now using a 'select' type custom field for the ratings value.

It should only show the options/values which you've set in the field settings in the relevant field group.

If some of the posts are showing '0' as the value, when the field itself doesn't have this option, then it is possible that this value was saved from old settings of this custom field.

You can update/re-save those existing posts, so that the custom field value for this field is updated as per the new settings.

I hope this helps and please let me know if you need further assistance.

regards,
Waqar

#2675883
rating.png

Hi Waqar,

I have arranged by number of stars and after the value 1 there are really empty fields (see attached image).

I see the Validation of number is checked at the Field Group, does this create the value 0 for an empty field?

#2676267

> I see the Validation of number is checked at the Field Group, does this create the value 0 for an empty field?

- Turning on the option to validate as a number shouldn't be forcing the '0' for the empty values.

Can you please share temporary admin login details, so that I can see how this custom fields is set up in the admin area?

Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.

The topic ‘[Closed] Stars filter only shows one value’ is closed to new replies.