I was working on a client site tonight and happened to upgrade to the latest version of WordPress (3.4). I didn’t notice anything was amiss until a few hours later when I was poking around their site and realized that the sidebars were all messed up. We use 6 different templates on the site to display different version of the sidebar (not to mention that we also use page templates for Google AdWords conversion tracking on the various thank you pages).
The fix
So thanks to a helpful commenter at stackoverflow.com, here’s the solution. At the top of the code for a page template (e.g. page.php), this code:
1 2 | <?php /* Template Name: My special page template */ ?> |
…needs to be formatted like this:
1 2 3 | <?php /* Template Name: My special page template */ ?> |
Once you update the syntax for all your page templates, they should start working immediately, but you should check in the page editor anyway.
Comments on this entry are closed.