Select Page

If you have custom page templates in your WordPress theme, you might be having problems with the latest edition of WordPress. Version 3.4 “Green” is quite particular about page template name declarations. Template names need to be declared on their own dedicated row.

In other words, change this:

<?php /* Template Name: Custom Page / ?>

to this:

/* Template Name: Custom Page */

This should be considered a bug, not some sort of stricter method for formatting. I’m not saying that because I know anything about the core developer team’s intent, but generally PHP should not be sensitive to line breaks. Though using comments to declare a page title is a bit of hack in itself, I still think core dev should try to correct this issue so that WordPress has as few special exceptions to standard PHP coding as possible.

Hope this helps you out if you’re dumbfounded by page templates not showing up in your WordPress install.

UPDATE: This bug has been fixed in the new WordPress release, version 3.4.1.