WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 2 years ago

#41792 new enhancement

Suggested Enhancement to WordPress' Handling of Authors and Author URL's

Reported by: kbooshco Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Themes Keywords: 2nd-opinion
Focuses: template Cc:

Description

Hi, everyone, my first post here, but I have some concerns.

*WordPress' Handling of Authors*
I feel it's not the right UX when, say on a single author blog, the url "blog.com/author" goes to 404.

I'd like for WordPress to programmatically direct/redirect a blog.com/author to the archive of this single author if single author. I mean, say I, Kabolobari, am an author on a single author blog and the url to my posts is blog.com/author/kabolobari. So, WordPress automatically creates that based on my name choice.

Now, since WordPress can also tell a multi-author blog once there's more than one author, I'd like if WordPress then automatically builds the url for such as blog.com/authors/kabolobar, Kabolobari being one author on this blog.

Then if a user/browser were to backspace the url, of course, their intention would be to see all authors at blog.com/authors, right? Thus, WordPress shouldn't send them to a 404. WordPress should intelligently default that to a list of all the authors on the multi-author blog.

Is my explanation clear?

Then, WordPress can, as with other archives, leave a way for admins or theme developers to customize how they'd like this authors.php, as an example, template to be.

To summarize,

Single Author Blogs = blog.com/author/single-author
Then, blog.com/author = This Single Author and a list of their posts

Multi Author Blogs = blog.com/authors/multi-author
Then, blog.com/authors = These authors list and a list of their posts

Then leave all of these to be customizable by theme devs.

I'm having a hard time hacking my way around this because of this feature which I see is unavailable. If I'm wrong and there's actually a straightforward way about this, kindly direct me.

*As an Example*
Kindly, study the website kincommunity.com. Because what I’m building is very similar to that. Now, you should notice that when you hit Creators on the navigation at this site, Kin Community’s developers chose a custom post type route to display their Creators.

Thus, Creators takes you to kincommunity.com/our-community/. Then a single creator is at kincommunity.com/creators/rosanna-pansino/, for example. But when you try kincommunity.com/creators/, as a user you expect to see a list of all creators, right? But you get a 404.

I figure if WordPress allowed for a native way to flex around this, so that say you added a role of Creator (coding it yourself or with a plugin such as Members by Justin Tadblock) and you give this new role about same level of cap as Author.

Then one wouldn’t need to use CPT for this purpose and then the logic as I’ve explained above would take hold automatically with allowance for customization to look like the theme’s overall feel.

Could we examine these concerns? Thanks.

Change History (5)

#1 @danieltj
2 years ago

  • Component changed from General to Themes
  • Focuses template added
  • Keywords 2nd-opinion added

I see what you're saying and I like the idea. I'm just curious how we'll go about displaying the information though. From what I've read, it seems as if this proposal is to redirect users to the author archive of the only poster on the site and when there is more than one author (multi author site [>= 2]), show a list of them?

My only concern is how we go about showing the list of multiple authors. I think that would require additionally templates and styling for theme developers etc. It's a good idea though. Perhaps we could work on, at least in the first instance; just looking forward to implement the single author redirect?

Anybody else have any thoughts on this approach?

#2 follow-up: @tobifjellner
2 years ago

This can't be a part of WordPress core, since all templates (including author archives) are part that may be supplied by a theme.
But it could be a part of the standard theme.
However, it's important that the user can choose whether to have this function, or not. Some sites (especially when there's only one author, or if the site doesn't want to split published articles between various authors) don't want author archives at all.

For instance, without author pages, you get slightly higher security, if it's not too easy to figure out the user name of the main author, then the risk that someone will try to brute-force that account is lower. (Some security plugins may temporarily block login attempts for an account where brute-force is attempted, which might make life worse for the authorized user.)

#3 in reply to: ↑ 2 @danieltj
2 years ago

Replying to tobifjellner:

This can't be a part of WordPress core, since all templates (including author archives) are part that may be supplied by a theme.
But it could be a part of the standard theme.
However, it's important that the user can choose whether to have this function, or not. Some sites (especially when there's only one author, or if the site doesn't want to split published articles between various authors) don't want author archives at all.

For instance, without author pages, you get slightly higher security, if it's not too easy to figure out the user name of the main author, then the risk that someone will try to brute-force that account is lower. (Some security plugins may temporarily block login attempts for an account where brute-force is attempted, which might make life worse for the authorized user.)

This could be part of Core if it was just the individual author scenario that is redirected, but with multi author blogs you would definitely need another template to support the layout, potentially a hybrid of the current author.php template that is supported. I suppose it'd just be a case of checking the author count and redirecting if post count is more than one and post authors equals one.

I support this idea partially anyway. Multi authors, not so much because of the complications, but single author for sure.

#4 @tobifjellner
2 years ago

On the other hand, if the blog is single-authored, what difference will there be between /blog/ and /author/?

#5 @danieltj
2 years ago

Well the only difference is if the theme itself has a template for authors (author.php). If there isn't a author.php file defined in the theme then it'll default to the index.php file instead. But if there is an author.php theme file but you don't add the author name after /author/ then it'll 404. From a UX point of view, I think this simple redirect is a definite improvement at the very least. I am against this for multi-author sites, but for single author sites, I really like the idea.

Note: See TracTickets for help on using tickets.