Forums Forums Search & Filter Pro Hide Empty Terms Not Working

Viewing 7 posts - 1 through 7 (of 7 total)
  • Anonymous
    #40841

    Hi,

    I am trying to use the ‘hide empty terms’ option when adding a filter for a custom taxonomy.

    The filter is not correctly hiding the terms if they have no results against them.

    If you navigate to this link (
    https://www.bathcollege.ac.uk/course-search/?_sft_course_type=part-time-love2learn) you will see that in the dropdown for ‘Subject’, ‘Access to HE’ appears even though it has no results when chosen.

    I can see that ‘hide empty terms’ is set as when I print the $args variable on line 252 of taxonomy.php I get the following…

    Array ( [sf_name] => _sft_course_type [sfid] => 734 [taxonomy] => course_type [hierarchical] => [child_of] => 0 [echo] => [hide_if_empty] => [hide_empty] => 1 [show_option_none] => [show_count] => [show_option_all] => [show_option_all_sf] => All [show_default_option_sf] => [show_count_format_sf] => html [elem_attr] => [include] => [title_li] => [defaults] => ) 111111Array ( [sf_name] => _sft_course_subject [sfid] => 734 [taxonomy] => course_subject [hierarchical] => 1 [child_of] => 0 [echo] => [hide_if_empty] => [hide_empty] => 1 [show_option_none] => [show_count] => 1 [show_option_all] => [show_option_all_sf] => All [show_default_option_sf] => [show_count_format_sf] => html [elem_attr] => [include] => [title_li] => [defaults] => )

    I can see from this, that ‘hide_if_empty’ is not set, but I don’t think changing this helps, and I can’t see where it would be controlled in the plugin options.

    Do you have any idea what could be causing these terms to show?

    Thanks for your help!

    Matt

    Ross Moderator
    #40846

    Hi Matt

    Did you try enabling “auto count” in the “general” tab?

    This should accurately reflect the count numbers in the current query, and therefor hide empty options.

    Thanks

    Anonymous
    #40852

    Hi Ross,

    Thanks for the quick reply.

    I’ve enabled the ‘auto count’ setting, and this has updated those counts, and shows some in the list as ‘0’ now, but still doesn’t hide them. I’ve set up the count on this link to show you what I mean… https://www.bathcollege.ac.uk/courses-part-time-love2learn/

    Thanks

    Matt

    Trevor
    #40855

    Hiding them is done in each element’s settings in the form ui

    Anonymous
    #40860

    I could have sworn I had that ticked earlier! I just don’t thinK I was ever in a situation in which they were both ticked.

    Thanks for your help guys!

    Matt

    Trevor
    #40863

    Can we mark this as resolved and close it?

    Anonymous
    #40868

    Yea go ahead. Thanks!

Viewing 7 posts - 1 through 7 (of 7 total)