Forums Forums Search & Filter Pro Display count only specific post type

Tagged: 

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

    Hi,

    I want to use the display count function but only want to see the count of the specific post type selected for this search form. Is there a way to do this?

    Thank you in advance

    Trevor
    #255365

    You want to see a count on the Post Type form field? If that is what you want, I am sorry, but this is not possible with the current version of the plugin. It may become possible in V3 of our plugin, due in a few months.

    If that is not what you wanted, maybe you could explain in more detail, with reference to a search form you have already made, with a live link/URL to your search page so I can take a look?

    Anonymous
    #255369

    I have used the display count function of certain taxanomies. Furthermore, I have multiple different post types which make use of the same taxonomies. In the example on https://neonresearch.nl/team/ I have made a filter for just the ‘academics’ post type, however, the display count seems to count all posts with this specific taxonomy, including those of different post types. Is there a way to fix this?

    Trevor
    #255373

    Ah. Are you using the same taxonomy across multiple Post Types, so that, even if the search is for one Post Type, the count also adds those from the other post types? Since ‘term splitting’ was introduced in WordPress, it is not recommended to use the same taxonomy across multiple post types – instead you should use Custom Fields to do this, as these can be applied to multiple post types. If you need to use taxonomies, you need to have/make separate custom taxonomies for each post type.

    Anonymous
    #255517

    Ah oke, I thought taxonomies where the way to fix this. But if I understand you correctly I should use the custom fields, than use the post meta field and filter on meta key with the right custom field?

    Do you know if there are any other downsides to using the taxonomy apart from searching and filtering? Is it for example less usable for search engines or something like that. The site is currently set up this way and changing it would require quite some effort while the display count is the only part where it has caused trouble so far.

    Trevor
    #255521

    Generally speaking, you should use taxonomies only if they are meaningful in the URL for SEO purposes. Where the main purpose is to organize or filter data, custom fields (post meta) should be used.

    The problem with a taxonomy that is used in two or more post types is that the terms are not meaningful for SEO, as the search engine will not know, from any one term, which post type it applies to.

    Anonymous
    #255525

    Alright, thanks a lot!

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