I’ve been hacking on our template a little and came across the wp_list_authors link which is exactly what I’ve been looking for.
I’ve added the following fragment to sidebar.php
<?php wp_list_authors('show_fullname=1&optioncount=1&feed=rss'); ?>
and it seems to work perfectly for all but one author (me!) where the link only points to the first article I wrote, and not the other 12. Anyone any ideas on whats causing this?
I did have the ‘admin’ account configured with the full name of ‘Stephen Mulcahy’ in the past – could this be causing this problem here?
I’m having the same problem and I’m admin. Could this be the reason my name isn’t displayed?
From my notes:
Tip: if there don’t seem to be enough author links check that you haven’t got (‘hide_empty=1’) because (‘hide_empty=1’) means that authors with zero posts won’t be displayed.
Also, if you are the administrator and there are no other authors, by default your name is not shown. There will be no
<li></li>elements within the
elements, which is not good markup. Also check that you haven’t got (‘exclude_admin=1’) because (‘exclude_admin=1’) hides your link.
Thanks for your help. What php file would contain (‘exclude_admin=1’)
I fixed this problem on my installation using a somewhat crude but reliable approach. I created a new user. I then deleted the user who’s posts were not showing up properly (when deleting a user wordpress asks you who to re-assign the posts to – I indicated I wanted to re-assign the posts to the new user).
The author links now work properly!
Before using this approach I took at look at some of the wordpress code but my time was limited and my php is a little rusty. I suspect some query somewhere is using the user’s display name (maybe called user nice name internally) rather than their unique id in some query. In situations where someone has maybe set the admin user and a normal user to have the same display name something is getting broken — this is only a guess though so corrections welcome.
- The topic ‘links created by wp_list_authors don’t list all posts for all authors’ is closed to new replies.