admin管理员组

文章数量:1134575

Only those that are authors have an author page.

But thing is my client wants to have users that have a page, but that do not have author capabilities (they can modify the info on it but not create content)

Thing is, that user being 'Subscriber' means it doesnt have a page.

Is there a capability that I can give that would give the user an author page? I can't seem to find what would trigger that.

Only those that are authors have an author page.

But thing is my client wants to have users that have a page, but that do not have author capabilities (they can modify the info on it but not create content)

Thing is, that user being 'Subscriber' means it doesnt have a page.

Is there a capability that I can give that would give the user an author page? I can't seem to find what would trigger that.

Share Improve this question asked Sep 15, 2023 at 13:11 Fredy31Fredy31 8782 gold badges15 silver badges31 bronze badges 0
Add a comment  | 

1 Answer 1

Reset to default 0

Only those that are authors have an author page.

This is not true.

Thing is, that user being 'Subscriber' means it doesnt have a page.

Neither is this.

Is there a capability that I can give that would give the user an author page? I can't seem to find what would trigger that.

You can't find it because it doesn't exist and that's not how author pages work.

What Determines If A User Has an Author Archive?

All users with a role on that site always have author archives out of the box in WordPress. No matter which role they have, what capabilities they posses, or how many posts they do or do not have.

Notice I used "archive" not "page". Author archives are post archives, specifically archives of posts restricted to those authored by a specific user.

Also notice I mentioned "on a site". A user on a multisite that has not been added or given a role on your site will show a 404. You might encounter this if you've not added yourself to a site but use super administrator powers to make changes. If the user shows in the Users section of WP Admin then they have an author archive.

What I think is happened is that visiting the author archive of a subscriber gives you a page saying nothing was found, and you've misinterpreted that as a 404, or a denial. Instead you're looking at an author archive template that's found no posts and is telling you that.

Roles and capabilities have nothing to do with this.

Look at the body class or via query monitor and you will see that if author.php or an author block template is in your theme it will be used for this, not the 404 template.

But thing is my client wants to have users that have a page, but that do not have author capabilities (they can modify the info on it but not create content)

This would be author.php, you don't need to enable it for subscribers, it's already there and already works that way out of the box.

本文标签: capabilitiesCapability needed for user to have an author page