Skip to content

Quick Tip: WordPress template drop-down list is missing

If you can’t find the list of page templates in the page editor on WordPress try this quick fix that will probably help.

In the function get_post_templates()  which is located in wp-includes/class-wp-theme.php
star the part of the return array;  in the first part of the function:


This might show a few errors on the form, but at least you’ll be able to choose or change a template to a page.

Note: editing a WordPress core file (wp-includes/class-wp-theme.php) is a temporary diagnostic only – it is overwritten on every WordPress update.

For a permanent solution try to print the error before the function’s return;

From my experience, a lot of things can cause this bug to appear, for example, if your style.css file is missing.

Leave a Reply