Support Forums

Looking for support? You can access the support system via your account.

Forums Forums Search & Filter Pro Display count for custom taxonomy display's count for all post types

Viewing 4 posts - 1 through 4 (of 4 total)
  • John Greenhoe
    #1295

    I have a custom taxonomy called deck-type and I have it assigned to a custom post called “deck” along with my “post”. I’m doing a filter form for just my “deck” posts and am filtering by the custom taxonomy deck-type but when I enable the display count, it display’s the total count of for each term of both “deck” and “post” post types instead of just displaying the count for just the “deck” since I am only filtering the deck post type.

    Ross Moderator
    #1300

    Hey John

    Basically this “count” number is stored in WordPress’ own tables whenever you add/remove a post from your taxonomy and automatically covers all post types if used with multiple post types.

    It is usually recommended to set up taxonomies exclusive to specific post types, so you could create two taxonomies one for each post type, and therefor you will have counts that match what you want.

    This is a temporary workaround, having said that there is other functionality that a lot of users have been asking for, which I am making a priority to include which will help with your use case above.

    Essentially the functionality I am looking to add is a “auto hide” of terms that have no posts – which would also auto update the counts displayed – I think this would work for you, see this feature request – https://support.searchandfilter.com/forums/topic/category-specific-searches/

    Thanks

    John Greenhoe
    #1325

    Thanks Ross,

    I knew I would be able to create two taxonomies as a work around, but since both post types use the same taxonomy and I can query each post type and that taxonomy individually I like to keep the code/database as clean as possible with as little extra as possible.

    I’ll just turn off the post count until you can fix it, I’m not sure how the plugin is setup but it would be nice that which ever post type is selected it only counts the post number for that taxonomy. Thanks.

    Ross Moderator
    #1327

    Hey John, exactly this and more!

    For example I have a search form like:

    Categories

    Apples (1)
    Bananas (1)

    Tags

    Green (1)
    Yellow (1)

    And then a user selects apples, the form would look like:

    Categories

    **Apples (1)** - selected
    Bananas (1)

    Tags

    Green (1)
    Yellow (0)

    So this would work for all categories, tags & taxonomies, and hopefully more fields..

    But this is a lot of work, so won’t be completed for a couple of weeks at least.

    I’ll keep you updated.

    Thanks

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

You must be logged in to reply to this topic.