Forums Forums Search & Filter Pro Custom Taxonomy: Items not in dropdown if Hide Empty checked

Viewing 10 posts - 1 through 10 (of 10 total)
  • Anonymous
    #210873

    I have a custom taxonomy on attachments only and am filtering my search on a Custom Taxonomy and 2 CPT custom fields. My filters include:
    1. Search form (default is blank)
    2. Taxonomy: attachment_category (hide empty not checked)
    3. CPT Field: document-year (hide empty checked)
    4. CPT Field: document_language (hide empty checked)

    When I bring up the search form all 15 values in #2 show up in the dropdown with correct counts, and the CPT Fields behave as expected when I apply filters. However, if i set the Hide Empty flag on the Taxonomy, the dropdown only shows 2 values. Am I doing something wrong, or am I missing something. The problem with leaving the Hide Empty unchecked on the Taxonomy is that when I filter on one of the CPT fields, all the values still show in the Taxonomy, but with (0) count if no items of that taxonomy apply to the filtered CPT field(s). CPT fields work as expected. Am I missing something, or it this a bug?

    Trevor
    #210887

    It sounds like it is working as designed. Those terms that show 0, I presume they are not being used on the posts, hence the zero count, else what is causing them to show 0?

    Anonymous
    #211260

    No, it is not. If Hide empty is not checked, the category drop-down shows 15 categories all with count > 0. When I check Hide Empty, the category drop-down shows only 2 categories with counts, even though the results show entries for all categories (including the ones not showing in the dropdown) . Is there a way to send a screen shot? if now, here are 2 links – one with hide empty checked and one with hide empty not checked.

    https://dev.haiti-now.org/resource-search-hide-empty-checked/
    https://dev.haiti-now.org/resource-search-hide-empty-not-checked/

    Trevor
    #211265
    This reply has been marked as private.
    Anonymous
    #211275
    This reply has been marked as private.
    Anonymous
    #211277
    This reply has been marked as private.
    Trevor
    #211281
    This reply has been marked as private.
    Trevor
    #211283
    This reply has been marked as private.
    Trevor
    #211295
    This reply has been marked as private.
    Anonymous
    #211305

    Thank you so much for your help. I found my problem – and it was not with the plugin. It was the method I used to bulk load the taxonomy tables in WordPress. I wrote custom sql to upload all the attachment categories and tags, but I neglected to update the count in the term_taxonomy table after I got them uploaded. Even though the counts displayed properly in the Attachment Category screen in the media admin section, your plugin must look at that count to determine wether it is empty. Once I updated the counts, both the original attachment_tag taxonomy and the new resource_category taxonomy worked as expected.

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