Support » Plugin: Authors List » Category Attribute Not Working

  • Resolved egurry

    (@egurry)


    I am using this plugin to show authors that have created products, and it is a life-saver! Thank you. But now I want it to only show authors that have created products in a specific category, and that category limitation is not being respected (the shortcode still returns all authors, even those with no products in this category).

    Here is the shortcode that works to return all authors:
    [authors_list post_types=”product” style=”1″ columns=”4″ amount=”12″ show_count=”yes” show_link=”no” count_text=”Units” authors_list orderby=”post_date”]

    And here is the shortcode I am using to show only authors with products that have category ID 56:
    [authors_list post_types=”product” categories=”56″ style=”1″ columns=”4″ amount=”12″ show_count=”yes” show_link=”no” count_text=”Units” authors_list orderby=”post_date”]

    Any suggestions?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author WPKube

    (@wpkube)

    Hi @egurry

    You’re welcome, happy to hear that.

    The “categories” parameter is specific to the categories of regular posts (WP Admin > Posts).

    The custom post type has a custom taxonomy. It’s still categories, but it’s not the “categories”, WordPress is a bit confusing regarding that 🙂

    So you would use the taxonomy and terms shortcode parameters for this purpose.

    taxonomy is the name of the taxonomy and terms are the specific terms (categories) you want.

    I assume that’s WooCommerce products, in which case the taxonomy name is product_cat.

    This is the shortcode:

    [authors_list post_types="product" taxonomy="product_cat" terms="56" style="1" columns="4" amount="12" show_count="yes" show_link="no" count_text="Units" authors_list orderby="post_date"]

    Thread Starter egurry

    (@egurry)

    Thanks for that quick reply! I tried the shortcode you provided, but it still isn’t working. I put together a quick page to show you what I am seeing:

    https://7i.se/Sz (link valid for 7 days)

    On the left I am using the following shortcode, which includes a product_cat restriction and should only be returning 6 authors (and 36 total products/posts):
    [authors_list post_types="product" taxonomy="product_cat" terms="177" style="1" columns="3" amount="12" show_count="yes" show_link="no" count_text="Units" authors_list orderby="post_date"]

    On the right is this shortcode, which has no product_cat restriction and hundreds of matching authors/posts:
    [authors_list post_types="product" style="1" columns="3" amount="12" show_count="yes" show_link="no" count_text="Units" authors_list orderby="post_date"]

    But both shortcodes are returning the same list of authors (or at least the first 12 are the same, which is enough to show that the block on the left isn’t performing as expected). Any other ideas?

    • This reply was modified 2 months, 2 weeks ago by egurry.
    Plugin Author WPKube

    (@wpkube)

    Hi @egurry

    You’re correct. I tested it out on my installation and it’s not working as expected. I’ve added this to the to do list and it will be fixed in the next update.

    Should be released on Monday at the latest.

    Thread Starter egurry

    (@egurry)

    Wow, quick turnaround! Thanks so much. Also, thanks for confirming I wasn’t losing my mind!

    Plugin Author WPKube

    (@wpkube)

    You’re welcome @egurry

    Plugin Author WPKube

    (@wpkube)

    Hi @egurry

    The update is released (version 1.2.8).

    Give it a try and let me know if it resolves the issue.

    One thing to note, the “show_count” functionality isn’t limited by the taxonomy/term filter.

    The WordPress function count_user_posts() that returns the amount of posts a user has, does not have the option of filtering by taxonomy/term.

    If that is an issue then let us know and we’ll figure out a custom approach to getting the counts so the taxonomy/term can also be part of it.

    Thread Starter egurry

    (@egurry)

    Thanks for the update @wpkube. I have tested it and it seems to have fixed the issue and is now restricting results to match the product_cat categories. You raise an interesting point regarding “show_count” functionality. I would be interested in discussing what would be required to have show_count also respect product_cat restrictions. I just submitted the contact form on your website, look forward to continuing the discussion via email.

    Plugin Author WPKube

    (@wpkube)

    Hi @egurry

    You’re welcome.

    The contact form on wpkube.com? My boss will get it and he’ll forward it over to me (I handle development/support of all the plugins by WPKube).

    Thread Starter egurry

    (@egurry)

    If there is a better way to reach you, LMK.

    Plugin Author WPKube

    (@wpkube)

    Hi @egurry

    You can use the contact form at docs.meridianthemes.net (“Contact” in the top right).

    Thread Starter egurry

    (@egurry)

    @wpkube I just pinged you there

    Plugin Author WPKube

    (@wpkube)

    Hi,

    Got the message and answered, we can continue over there.

Viewing 12 replies - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.