[wp-trac] [WordPress Trac] #45347: Add extra template lookup by author role
WordPress Trac
noreply at wordpress.org
Wed Nov 14 11:45:32 UTC 2018
#45347: Add extra template lookup by author role
-------------------------+-----------------------------
Reporter: andrei.igna | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Users | Version:
Severity: normal | Keywords:
Focuses: template |
-------------------------+-----------------------------
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)
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45347>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list