#45347 closed enhancement (wontfix)
Add extra template lookup by author role
Reported by: | andrei.igna | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Themes | Keywords: | |
Focuses: | template | Cc: |
Description
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 (2)
Note: See
TracTickets for help on using
tickets.
Hum, it should be handled inside author.php IMO. You can do a role switch and then load the template you want. It would be a bit overkill to add all this hierarchy IMO.