KNR Author List

Download KNR Author List Widget


The KNR Author List widget for WordPress was created out of the need to replace one of the WordPress 2.7 API functions that I was using due to a performance issue. Now, the KNR Author List is the most flexible author listing widget available from the WordPress Plugin Directory.

The KNR Author List plugin is available under the GNU-GPL license, which means you are free to download the source code and modify it to suit your needs. If you would like to customize the behavior of the plugin, you can make a request for it in the WordPress forum (I’ll add these to the wishlist) or hire a PHP programmer to do it for you if it’s an urgent requirement.

In its simplest form, the KNR Author List looks like this:

You can get it to appear as a dropdown list or an ordered list. The ordered list is pretty useful to get a “top authors” ranking for your blog.

If you would like to browse through the SVN repository for the source code, the URL is:
http://svn.wp-plugins.org/knr-author-list-widget/

Widget Settings

The KNR Author List is highly customizable. Settings for the widget can be made under Appearance > Widgets. Drag the KNR Author List onto a sidebar placeholder and expand it by clicking the arrow to the right of the widget’s “titlebar”. Remember to click the “Save” button at the bottom of the widget settings panel.

General: Title

The title entered here is used as a heading for the list of authors. In the default WordPress template, this is included within an H2 tag, but the theme that you use can change this to a different tag.

General: Include Authors With 0 Posts

When an author has not made any posts, you would probably not want to list him/her within your author list because although he/she has an account with author privileges on your blog, he/she has not written any posts and is therefore not an author.

General: Include Contributors

Contributors are like authors, except that they can’t directly publish a post/page to your blog. They require an editor or an administrator to “approve” their posts/pages by publishing them. You may choose to bestow users with these privileges if they aren’t regular writers for your blog and un-check this option for the author list to hide them from the author listing.

General: Include Administrators

You may choose to leave out administrators because you’ve made the first welcome message with the administrator account but use your own account which has author privileges. In an ideal scenario, due to security concerns, an administrator account shouldn’t be used unless you intend to change your blog settings, appearance, themes or plugins.

General: Include Editors

You can include editors in the author list by checking this option. Editors can publish posts/pages submitted by contributors and can edit posts by other users.

General: Author Limit

If you have a lot of authors on your blog and would like to display other items on your sidebar, you would want to limit the number of authors displayed in the KNR Author List widget. The GeeksWithBlogs community, which I was a member of a long time ago, had a listing of all the authors on the blog community and that was a huge list. Specify a number here to set the limit, or specify “-1″ or “0″ for no limit.

General: More Authors Link

If you specify an author limit (see previous setting), you would want to provide a link to a page at which the user can view a complete listing of authors on your blog. Provide the URL to that page here (this URL is used in the HREF of the hyperlink and can be Javascript Eg. “javascript:alert(‘Coming soon!’)”).

This functionality may not work in version 1.8 of the plugin. Upgrade to version 1.9 to use this functionality.

General: More Authors Text

When specifying a “more authors” link, specify the text with which you would like to link to the authors listing page here.

This functionality may not work in version 1.8 of the plugin. Upgrade to version 1.9 to use this functionality.

General: Show As Ordered List

Displays the list of authors within an ordered list (OL tags) instead of within an un-ordered list (UL tags). This can be used to display a leaderboard or ranks for the authors.

General: Sort With

Authors can be sorted by first name only, last name only, first name followed by last name, last name followed by first name, number of posts, author registration date, by custom order, or display an unsorted list. You can set the custom order for the author list in Settings > Author Order.

General: Sort Reverse

You can reverse the sorting performed by all of the above sort critera, except the custom sort because it would be confusing to have the system list the authors in the exact reverse of the order that you are specifying (though it would be nice to have an option to automatically reverse the user-specified order on the custom ordering page).

General: Show Avatar

You can have the author’s Gravatar displayed next to his/her name in the list. I might add support for other kinds of avatars but as Gravatars are the most commonly used (and was a feature requested by one of the KNR Author List users), I decided to add it in before adding in support for any other kind of avatars. Support for AuthorPic might be considered for a later version of the plugin.

General: Show As Dropdown

If you have a long list of authors, you might want to reduce the list to a dropdown list. It helps save space and I haven’t seen other widgets that enable you to display a list of authors within a dropdown, so I thought why not?

General: Dropdown Unselected Text

When the page is initially loaded, the dropdown displays text instructing the user to select an author from the list (Eg. “–Select Author–”). If you do not specify anything, the dropdown is blank by default.

Markup: List Class

A CSS class can be applied to the UL or OL tag containing the author names within LI tags by specifying the CSS class name here.

Markup: List Item Class

The CSS class specified here is applied to the LI elements holding the author name

Markup: Span Count Class

Specifying a CSS class name here places the post count and its brackets within a SPAN tag having this CSS class.

Markup: Span Author Class

Specifying a CSS class name here places the author name and the hyperlink tags (A tags) within a SPAN tag having this CSS class.

Markup: Author Link Class

The CSS class name specified here is applied to the author name hyperlink (A tag).

Markup: Show Count

Enabling this option displays a post count next to the author name.

Markup: Display Count Before Name

Enabling this options displays the post count and its brackets before the author name and the hyperlink.

40 responses so far

  1. Nice plugin! I have a feature request — my client wants to use the “display name,” not the first and last names, for the list of authors. But I don’t think that’s a feature I have access to here. If it’s something you could add to a future version, that would be cool. Thanks!

  2. [...] KNR Author List —  Allows you to arrange the Contributors List by order of when the Contributor joined  (However, this Plug-In is about to be replaced) [...]

  3. I use iNove theme with a drop menu (using categories and/or pages). I want to have the author list in this menu. Can your plugin be used for it ?

    Thank you.
    (If you respond, notice that I’m french : I have difficulty with English)

  4. Do you have a raw php code I can use since I do not have a widget system implemented on my custom template?

  5. Nitin Reddy Katkam

    @See Mee:
    I haven’t tried the iNove theme yet, but as long as it supports widgets, you can use the KNR Author List plugin. I’ll try it shortly to check it out.

    @Brad:
    Sure! You can (a) copy-paste code right out of the plug-in files, or (b) you can activate the plug-in (without adding the widget) and make a function call directly from your theme/page. I’d suggest the second approach as you can get plugin updates.

  6. Do you have a link here for instructions on how to use the Markup Options? I also echo Sarah about using display names. My authors prefer not to use their full names on our blog.

  7. Nitin Reddy Katkam

    @TSS:
    I’ll add instructions on using the Markup Options soon. They affect the markup generated from the plugin so you can, for example, add a CSS class name to an element to style it with CSS.

  8. The options dont seem to work. When I try to include admins, etc it does not show them When I uncheck Include Authors With 0 Posts, it shows them anyway. When I uncheck to showthe count, it still shows (and is showing a zero count when I didnt want zero counts displayed.) *sigh*

  9. Nitin Reddy Katkam

    @Gea
    I’ve tested the author list with both the option to include admins within the author list as well as excluding authors without any posts. Both options work correctly. I hate to state the obvious, but did you click on the Save button further down in the widget settings to ensure that the settings you have made are saved? Also, are any caching plugins, proxies etc. in use?

  10. This plugin is what i’ve been looking for.
    I use the dropdown mode.
    Everything runs well, but there are always double users in the drop down list. Did i miss something?
    thanks!

  11. Nitin Reddy Katkam

    @buletin
    I think I know where the problem is coming from. The users are probably entering the same name as their first name and last name. (Eg. First name: “Nitin”, Last name: “Nitin”, List shows: “Nitin Nitin (5)”). Do let me know if your problem is different.

    Another user has asked me to provide an option to use the display name instead of the first name and the last name. This feature should make it into a release in the near future.

  12. @buletin
    Oh, hang on. I’ve just looked at your website. Although I can’t understand the language on the site, I was able to identify the author list and have found the issue to be different from what I had originally expected.

    I’ll email you on the address provided in your comment so we can work together to determine the cause of the duplication.

  13. I already reply your email…
    Thank you for your quick respon and help :)

  14. Nitin Reddy Katkam

    @buletin
    Thank you for the information regarding the bug. I believe the problem you are encountering is because you are using WordPress-MU instead of WordPress-Standard.

    A work-around you can use is to select custom ordering, move the duplicates to the bottom of the list, and set the author list limit to the number of unique users that you have on the blog.

    I’ll look into the use of the plugin on WordPress-MU, which is currently unsupported. The setup for WordPress-MU is a little more complex, requiring a domain name (setup via the hosts file for a development environment) and requiring the use of port 80. I was hoping to wait till they come up with a more flexible install for it.

  15. [...] just put up the documentation about the various options provided by the KNR Author List widget for WordPress. The documentation ought to help web designers the most, as the markup options [...]

  16. Nitin Reddy Katkam

    @TSS: I’ve added the documentation on using the general and markup options within the KNR Author List to this page.

  17. I’ve tried the custom ordering, but since there are 2 double users, it is only completely removing a double user while another one still remain.
    But it’s okay, i’ve got a clue from your explanation. You right! this happens because i’m using WordPress-MU and there are two users with Author Role or higher (other than Subscribers) in 2 blogs.
    I’ve solved the problem for both double users with this trick:
    1. i change my user role on other blogs as Subscribers.
    2. create a new user as a contributors to preserve the admin posts, then allocate admin posts to that new user.
    I think KNR Author List read all Wordpress-MU users on database and show them all on the list when those users having Author role on some blogs.
    Now i can continue using the plugins, but i’ll keep waiting for the KNR Author List enhancement (WordPress-MU compatible) :).
    Thank’s alot!

  18. Nitin Reddy Katkam

    @buletin: Thank you for posting the steps you took to get the author list widget working normally on your blog.

    I’ll try to setup a WordPress-MU development environment soon so I can work toward making the plugin WordPress-MU compatible.

  19. Hi there.. thanks for this lovely plugin. I was wondering what is the code I need to enter into my sidebar.php to place this plugin?

    I have a lot of customized stuff on my sidebar and therefore can’t use the built in widget feature.

    Your help is greatly appreciated!

  20. Just came here to say Thank you very much :)

    I’d like this “Show Display Name instead of Full Name”-feature as Sara suggested very much too.

    I’ve hacked it for now but feel guilty for the mess I created in your code ;-)

    Thanks again!

  21. Hi Nitin,

    I’m using your plugin. Its superb. I plan to use this in another blog also. But in the template widget is not available can u give the code to fetch the dropdown list of authors.

    Thanks,
    Satheesh

  22. Hi,

    Thank you for the great quality of your blog, each time i come here, i’m amazed.

    black hattitude.

  23. Nice plugin. It would be great to insert option to sort by username (registration name)..

    Nice work!

    :)

  24. Wonderful plugin, great work! I have two questions.

    1. The width of the widget is based on the length of the Author’s names, some of my members have long names which makes the width of the widget overrun my page, how can I set a finite width for the widget?

    2. When a user lists a first and last name in their profile, even if they select their anonymous username as their “Nickname”, their first and last name appear in the widget list. How can I have just their “Nickname” appear in the widget even if they have a first and last name entered in their profile?

    Thanks so much!

  25. Whoops! Forgot to mention that the Gravatars are not appearing even though the option is selected. Appreciate any suggestions!

  26. Nitin Reddy Katkam

    @Adlib

    Hi!

    1. Widget Width
    You can use CSS to set the width of the widget. This will cause author names to wrap over to the next line. If you can send across your blog URL, I can send you the CSS you need to insert to get the desired appearance.

    2. Name in author list
    I currently fetch the first name and the last name of the author for display in the author list. I could either create a custom mod of the widget for you or you could wait till I get the features in the next version of the plugin.

    Hope this helps.

  27. Hi there,

    First of all let me tell you that this is a really good Widget :-) I really apreciate that you took the time for programming it!

    I have some questions I hope you can Help me :-) I have added the gravatar feature (and works well) but the gravatar thumbnail is tiny, I want it to be a lil bigger, I have added 1 class to my stile.css of my template and associate it to the KNR options but doesn’t work :( I think I don’t know how to do it, Could you please help me to do the changes? or to give me some advise or tip ?

    I give you my Blog Page: accesototalpuebla.com/accesototal/ is in spanish, but its easy to find out knr-author-List widget :-)

  28. Nitin Reddy Katkam

    Hi Carlos!

    The gravatar feature was added in as a ‘hack’, in response to one of the feature requests that I received for the plugin. You might be able to edit the size directly in the plugin source code though.

    Look for the line that reads
    $avatarPic = getAvatar($aShowAvatarMode, $row->user_email, 16);
    and change the 16 to a higher number, such as 32 or 64.

    I intend to re-write the plugin using the new WordPress 2.8 API for widgets, which is when I plan to refactor quite a bit of the code.

  29. Nitin Reddy Katkam

    I am setting off for a holiday so will not be able to respond to support requests till mid-January. Until then, if you have a question, you might be able to hire a PHP developer to make the modifications that you require to the plugin. Do feel free to send across any changes that you might make to the plugin such that it can be incorporated into the next release of the plugin.

  30. Nitin, I want to thank you for all your support, Im learning PHP code but im not yet an expert, so it has been Great to seen that you answer the thread in only 1 day :-O I really appreciate it. Have a Happy Holydays, I hope you to enjoy this days. Merry Christmas and Happy new Year.
    Carlos Giles,
    Mexico

  31. Hi Nitin – you did a great job – I like this plugin.

    I’m using the plugin Members from Justin Tadlock. With this plugin you can create new roles.
    I created a new role “Photographer”. No I’d like to show the list of all Photographers.
    In “General Options” I can include Contributors, Administrators and Editors. Unfortunately my role “Photographer” is not displayed in the list.

    Do you have any idea how I can do that?

    Thanks for your help!
    TIMIT

  32. Hi Nitin

    I have installed the plugin “Members” from Justin Tadlock.
    I created a new role “photographer”.

    I NKR Author List I can include Contributors, Administrators and Editors.
    The new role “photographer” I can not include.

    I only want to show all photographer in the Author List.

    Do you see any possibility to do that?

    Thanks for your help!

    TIMIT

  33. Nitin Reddy Katkam

    Hi Timit!

    The “Photographer” role is not a standard role in WordPress but is an extension from the Members plugin that you are using. If you would like help with this feature, I can customize the plugin to support the role that you require, but this feature will not be entering mainstream soon.

    -Nitin

  34. Hi Nitin

    Thanks for your answer. Regarding customization I have some questions.
    - what are the conditions?
    - can you do that in a way I can “easily” update further versions of the plugins?

    I have had a look on the following plugins:
    Author Avatars List – http://authoravatars.wordpress.com/
    Justin Tadlock – http://justintadlock.com/archives/2009/09/17/members-wordpress-plugin
    Authors Widget – http://blog.fleischer.hu/wordpress/authors/

    Your plugin offers the best possibilities.

    Thanks for your feedback.

    Regards,
    Serge

  35. This is a nice plugin and worked perfectly as I wanted. I have a suggestion.
    I think to get author url in smart way is like
    check line 324 in plugin version 1.9.1
    //$authorUrl = $blogUrl . ‘/?author=’ . $row->ID; current
    $authorUrl = get_author_posts_url($row->ID); // I modifed

    same thing in many places. In this way the author id will be hide from others and even can used custom authoer permalink (http://wordpress.org/extend/plugins/wp-htaccess-control/)

  36. Hi Timit,

    Great work!

    You mentioned above that you can “make a function call directly from your theme/page.”
    What is that function call? I would like to show the author data in a page.

    Thanks and cheers,
    Gil

  37. Whoops! Of course I meant .. HI Nitin!! sorry about that!

  38. Nitin Reddy Katkam

    Hi!

    Sorry about my late replies. I’m vacationing in India and so haven’t been able to respond to my site/blog comments as often as I would like.

    @Timit

    You have my reply in your email. Hopefully, some of the requested features will make their way into the new release of the plugin that uses the WP 2.8 widget API.

    @Sabuj Kundu aka manchumahara

    Thank you for the suggestion. I believe yours is the second suggestion I’ve got for the plugin so far. I’ll use the change you’ve suggested in the next version of the plugin.

  39. Hi Nitin,

    Hope you are enjoying your holiday.

    I would like to know how I can add this widget to my sidebar by amending the sidebar.php file.

    Thanks in advance!

  40. Hello,
    Great Plugin!
    I’d like to see clean URL for teh aothor instead of ?author=10 lets say. In rewrite mode sud look like /authors/admin
    tried to use $authorUrl = $blogUrl . ‘/authors/ . $row->user_login , but i got an empty user_login!

    the final version looks like blogurl.com/authors/

    your help is much appreciated
    thank you!

Leave a Reply

CAPTCHA image