Support » Themes and Templates » links created by wp_list_authors don’t list all posts for all authors

  • Resolved smulcahy

    (@smulcahy)


    Hi,

    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?

    http://blog.aplpi.com/index.php/author/stephen-mulcahy/

    I did have the ‘admin’ account configured with the full name of ‘Stephen Mulcahy’ in the past – could this be causing this problem here?

    Thanks,

    -stephen

Viewing 6 replies - 1 through 6 (of 6 total)
  • 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 <ul></ul>
    elements, which is not good markup. Also check that you haven’t got (‘exclude_admin=1’) because (‘exclude_admin=1’) hides your link.

    Hi Richard.

    Thanks for your help. What php file would contain (‘exclude_admin=1’)

    ?

    Ssor

    Hi,

    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.

    Ok, I’ll have a play and see what I come up with.

    Thanks

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘links created by wp_list_authors don’t list all posts for all authors’ is closed to new replies.