So this is very odd.
I’ve done some research and while WordPress does support login names with spaces in them, general consensus on the forums is that this isn’t a good idea. Although the WordPress core does the right thing, there’s no guarantee that themes or plugins don’t make assumption about login names.
But having said that, I’ve done some testing and can’t seem to replicate this. What I’ve done is, in addition to my account which is gary
, I’ve created two accounts, both with spaces and with differences in case, so there’s Upper Case
and lower case
(not the most imaginative of names I know).
On a locally hosted WordPress install (localhost:8888
) I’ve created test posts for both these new accounts, disabled all plugins (except WP Biographia) and used a stock WordPress theme (TwentyTen in this case).
I’ve also created a Contributors page, with the following shortcodes …
[wp_biographia user="gary"]
[wp_biographia user="Upper Case"]
[wp_biographia user="lower case"]
For each post, the theme uses the WordPress get_author_posts_url
API call. This API call builds a URL to the author’s archive page in the form of [host[:port]][prefix][/author][/user]
. So for my gary
account, the URL is https://localhost:8888/author/gary/
. But the API call also detects login names with spaces in them and replaces the spaces with the -
character and lower cases the remainder of the login name, so for the Upper Case
user the URL is https://localhost:8888/author/upper-case/
and for the lower case
user the URL is https://localhost:8888/author/lower-case/
.
This all works as it should and the author archives for all the users, when accessed via the theme’s links, display correctly. As does my mocked up Contributors page.
WP Biographia uses the same API call and thus, this also works.
So there’s something on your site, either in your WordPress setup, in your theme or in a plugin which isn’t working correctly. Interestingly enough, although https://mudandadventure.com/author/Paul%20Buijs/
generates a 404 error, if I manually fix up the URL to what WordPress should support, as in https://mudandadventure.com/author/paul-buijs/
, this also 404s, which isn’t what I’d expect.
From this, I don’t think there’s an issue with WP Biographia’s handling of login names with spaces in them. At least, I’ve been unable to replicate this using the current released version of the plugin. So I think the answer may lie elsewhere.
What I’d suggest is that you firstly revert to a stock WordPress theme, any of the Twenty series should be fine and disable all plugins. Check the author archive links that this theme generates. Do they look as they should (all lower case and -
separated) as I’ve described above?
If this works, then re-enable WP Biographia and re-test. What happens?
If this works, re-enable each plugin you have and re-test after you’ve enabled each plugin. What happens?
Finally, revert to your custom theme and again, re-test.
I appreciate that this is a laborious process, but it’s the best (and probably only) way to narrow down the source of the problem.
-Gary