New 'sort by author' function - why are customers authors too?

Hi again,

No matter what I try, (all) my customers are listed as author too at the new blog sorting options. Is there a way to repair this fast? I would rather not reveal all my customer names to the general public.

Thanks,

Comments

  • Sorry but we don`t understand what you mean exactly. Can you explain it with examples? Also please tell if this happened after last update or what?
  • Since your latest update, all users, including woocommerce customers, are listed as 'authors' at the site's blog. Please see example: http://snag.gy/yuO7w.jpg

    This is wrong and should be corrected. Nobody wants a full list of his customers to be available to any one through the site's blog or portfolio sorting options.
  • OMG, you're right. We did not realized that this section show customers. We really sorry for that. Of course this will be fixed with future update but at this moment you can fix it yourself.

    To do that, please go to index.php file and find code which looks like below:
    if( in_array( 'subscriber', $author->roles ) ) unset( $authors[$ka] );

    and replace it with below code:
    $remove = true;
    if( in_array( 'author', $author->roles ) ) $remove = false;
    if( in_array( 'editor', $author->roles ) ) $remove = false;
    if( in_array( 'administrator', $author->roles ) ) $remove = false;
    if( $remove ) unset( $authors[$ka] );
  • Glad you agree it should be fixed ;-) 

    Thanks for the code!
Sign In or Register to comment.