Faceted Search Widget
[resolved] Showing taxonomies from custom post types not currently viewed. (4 posts)

  1. cw17s0n
    Posted 3 years ago #

    First great plug in thank you.

    The problem I am having is when the post type you are viewing has a taxonomy term that is also associated with another post type it gets added to the count.

    Example, I have 2 cpt: solutions and stories and I have a taxonomy suppliers, with the terms: Supplier 1, Supplier 2, Supplier 3.

    I create a solutions post, assign it Supplier 1 & Supplier 2, create a stories post, assign it Supplier 2 & Supplier 3. When I look at either archive it will say there are 2 entries for supplier 2, even though there is only one post.

    I believe this same issue was brought up by anointed here

    Just wondering if any fix had come of it, I have tried the 2.0 dev version with no luck.


  2. cw17s0n
    Posted 3 years ago #

    I've made some progress, except it's not an ideal solution, only works for one post type. On line 197 of the 2.0 dev version if I hard code the post type it works as I want it to.

    $query = new WP_Query( array( 'post_type' => 'solutions', 'tax_query' => $tax_query ) );

    Any suggestions on how to make it so it dynamically adds the post type?

  3. cw17s0n
    Posted 3 years ago #

    And I've got it, $post_type = get_post_type(); before the foreach and $query = new WP_Query( array( 'post_type' => $post_type, 'tax_query' => $tax_query ) ); on what was line 197. Again, thanks for the great plugin.

  4. Ovidiu
    Posted 3 years ago #

    hm, just wondering if this plugin is supported?
    Any chance this problem gets generally solved?

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Faceted Search Widget
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic