wordpress - Cannot add custom page template to my child theme -



wordpress - Cannot add custom page template to my child theme -

i'm running wordpress 3.3.1.

i'm writing kid theme modifies default twentyeleven theme. seems normal, except when add together custom page template, doesn't appear in add/edit screen (so can't utilize it!).

to elaborate on "normal", here's working: kid theme appears , activates normally. css code (in style.css) appearing. files template hierarchy working (ex: front-page.php, page.php)

i've read , reread codex, , custom page template file ("coming-soon.php") seems have right header:

<?php /* template name: coming */

so why won't show under "template" drop-down???

i've added custom templates dozens of times , never had problem. possible difference can think of i'm writing kid theme (even though codex says shouldn't matter), or perhaps it's difference in newest update of wp.

i can't duplicate you're seeing clean install of wordpress 3.3.1. have theme 2 files, style.css, containing:

/* theme name: stackoverflow-8946077 template: twentyeleven version: 0.0.1 */ @import url("../twentyeleven/style.css");

and coming-soon.php, containing:

<?php /* template name: coming */ get_header(); ?><h1>coming soon</h1><?php get_footer(); ?>

the first part of copied question.

i see template expected:

the things can think of double-check:

the file exists on server you're running on the file's in kid template's directory (though should work if it's in twentyeleven directory) there's no file same name in twentyeleven directory, (i think) take precedence the file name ends in .php you have single space between "template" , "name:" (the regex used contains literal template name:)

failing that, dropdown populated get_page_templates function in wp-admin/includes/theme.php. might worth sticking debug code in there see if $templates variable includes coming-soon.php.

wordpress wordpress-theming

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -