Make WordPress Core

Opened 15 months ago

#45347 new enhancement

Add extra template lookup by author role

Reported by: andrei.igna Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: Users Keywords:
Focuses: template Cc:
PR Number:


Themes can display an author page, but it's always only a generic one.

At the moment it's a tricky process to make different templates for different authors (except targeting them by specific IDs or usernames) and here is a idea:

Add templates for user/author role, with author templates hierarchy looking like this:

  • author-{nicename}.php
  • author-{ID}.php
  • author-{role}.php - adding support for author-administrator.php, author-editor.php and author-{custom-role}.php
  • author.php
  • index.php

The extra template lookup can be added in get_author_template function and would make it easier for theme developers to prepare templates without specifying specific user info (IDs or usernames)

Change History (0)

Note: See TracTickets for help on using tickets.