Support » Plugin: Author Avatars List/Block » Consider products as blog posts

  • Resolved yannickburky


    Your plugin is not only awesome, but it’s also the only one, congratulations for that. But I have a little problem.

    My authors don’t make blog posts but publish products (woocommerce).

    Therefore, min_post_count=1 does not display any products.
    But that’s exactly what I’d like to do: display only the authors of published products.

    Can you help me?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Paul Bearne


    Hi @yannickburky

    I got to look at the code

    there is a filter aa_get_user_postcount that you can use to change what the count value is

    return apply_filters( 'aa_get_user_postcount', $total, $user_id )

    Untested example code

    add_filter( 'aa_get_user_postcount', 'aa_get_user_postcount', 10, 2 );
    function aa_get_user_postcount( $total = 0, $userid ){
       return count_user_posts( $userid, 'product', true ) ;

    hope this helps


    • This reply was modified 1 year, 1 month ago by Paul Bearne.
    Thread Starter yannickburky


    Yes it works perfectly !! Thanks Paul ❤

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Consider products as blog posts’ is closed to new replies.