Make WordPress Core

Opened 7 years ago

Last modified 7 years ago

#41690 new enhancement

Fix missing assignment of page templates on theme switch

Reported by: melchoyce's profile melchoyce Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: Themes Keywords:
Focuses: template Cc:

Description

Following up on #39692 and #39693, let's see if we can also save page template mapping when someone switches themes.

For example:

  • Variations on "homepage" or "front page"
  • Variations on "fullwidth"

Change History (2)

This ticket was mentioned in Slack in #core-customize by melchoyce. View the logs.


7 years ago

#2 @joyously
7 years ago

This one never made sense to me.
The theme-specific page template is saved in post meta (so per post). The value is not related to other themes, yet switching to a theme with a different template name will cause those pages to use the default.

The alternative to saving per post would be to save post IDs somewhere per theme.

Or make the post meta value an array with theme name and template name, or many entries for that same post meta with theme name and template name.

Or perhaps evolve the templates into a taxonomy (how a taxonomy is stored), such that there is something that core provides (default template name) that is stable and the others can be assigned, sort of like menus are. If the user could say "For all pages with post meta of 'full-width', choose 'fancyxx' to display".

Note: See TracTickets for help on using tickets.