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.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.