Skip to content

Instantly share code, notes, and snippets.

@KnightAlex
Last active March 17, 2023 07:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KnightAlex/eec9c6407da0d1142b0f317c399f53b0 to your computer and use it in GitHub Desktop.
Save KnightAlex/eec9c6407da0d1142b0f317c399f53b0 to your computer and use it in GitHub Desktop.
//unset Storefront templates
function theme_name_disable_page_template($post_templates, $theme, $post, $post_type)
{
unset($post_templates['template-fullwidth.php']);
unset($post_templates['template-homepage.php']);
return $post_templates;
}
add_filter('theme_templates', 'theme_name_disable_page_template', 10, 4);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment