WordPress.org

Make WordPress Core

Opened 4 weeks ago

Last modified 4 weeks ago

#41690 new enhancement

Fix missing assignment of page templates on theme switch

Reported by: 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.


4 weeks ago

#2 @joyously
4 weeks 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.