Blog /

Can’t find page templates after 5.8 WordPress update

Check how to re-add the theme support for page templates.

Are the page templates missing from Page Attributes? There might be two reasons:

  1. They have moved to it’s own option “Template” in the sidebar. You simply overlooked it, that’s fine.
  2. Your theme “doesn’t support” templates (which seems to be a bug and hope it will be fixed soon). Add the following code and the issue should be fixed:
<?php // don't copy this line
/**
* Add page template support
* @return void
* @author Karolína Vyskočilová (https://kybernaut.cz)
* @see https://wordpress.org/support/topic/page-templates-missing-from-page-attributes-after-5-8/
* @updated 2021-08-19
*/
function add_page_template_support_missing_in_WP_5_8()
{
add_theme_support('block-templates');
}
add_action('after_setup_theme', 'add_page_template_support_missing_in_WP_5_8');