Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#39749 closed defect (bug) (invalid)

Parent template don't appear in Child-Theme Page Attribute selection

Reported by: nicmare's profile nicmare Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.7.2
Component: Themes Keywords: reporter-feedback
Focuses: template Cc:

Description

Setup: Parent and Childtheme (which is activated). In Parenttheme folder are several page template files (i.e. page-table.php with /* Template Name: Table */).
Before WP 4.7 i could select those parent theme file in page attribute meta box. But now the select field has completly disappeared. It only appears as soon as i copy over those parent-theme files into my child theme folder which is not the main intention of the overall theme hierarchy?!

Change History (6)

#1 @swissspidy
8 years ago

  • Keywords reporter-feedback added

WP_Theme::get_post_templates() checks the parent theme as before. Previously/Related: [39168]

How exactly are the template names defined in the code? Is /* Template Name: Table */ all on one line?

Does it work with all plugins disabled?

#2 @nicmare
8 years ago

like this:

<?php
/**
 * Template Name: Table
 */

no plugins used.

#3 @tristangemus
8 years ago

I just created a child theme for twentyfourteen and I can confirm that page attributes populate correctly for both 4.6.2 and 4.7.2

Which version of WP were you running previously? Which theme are you using?

#4 @nicmare
8 years ago

  • Resolution set to invalid
  • Status changed from new to closed

alright. checked that with twentysixteen theme and it works. so i will keep an eye on that and i guess we can close the issue. sorry and thanks for validating!

#5 @swissspidy
8 years ago

  • Milestone Awaiting Review deleted

#6 @johnbillion
8 years ago

@nicmare Please let us know if you discover the cause of the disappearing page templates, in case it's something that can be improved in WordPress core.

Note: See TracTickets for help on using tickets.