Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vyskoczilova/b281305ce12fe468df54833d23bdb83f to your computer and use it in GitHub Desktop.
Save vyskoczilova/b281305ce12fe468df54833d23bdb83f to your computer and use it in GitHub Desktop.
Add page template support broken in WP 5.8
<?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');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment