Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to remove block-templates support using remove_theme_support #36396

Open
markhowellsmead opened this issue Nov 11, 2021 · 1 comment
Open

Comments

Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
@markhowellsmead
Copy link

@markhowellsmead markhowellsmead commented Nov 11, 2021

Description

remove_theme_support('block-templates'); (applied using the after_setup_theme hook with priority 20) doesn't appear to work when the plugin (v11.9.0) is in use.

Step-by-step reproduction instructions

  1. Add the following code to the theme or a plugin
  2. The template selector is still visible on the edit post screen.

Screenshots, screen recording, code snippet

add_action('after_setup_theme', 'sht_remove_block_template_support', 20);

function sht_remove_block_template_support() {
	remove_theme_support('block-templates');
}

Environment info

  • WordPress 5.8.1
  • Gutenberg 11.9.0

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@carolinan
Copy link
Contributor

@carolinan carolinan commented Nov 11, 2021

If your theme has a theme.json file then this is intentional.

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment