Skip to content

Instantly share code, notes, and snippets.

@yuliyang
Created December 28, 2021 07:56
Show Gist options
  • Save yuliyang/626410a1fc68b7633d31d4c18aa3296a to your computer and use it in GitHub Desktop.
Save yuliyang/626410a1fc68b7633d31d4c18aa3296a to your computer and use it in GitHub Desktop.
[WordPress] Disable Block Widget (after WordPress 5.8)
<?php
function ching_disable_block_widget() {
remove_theme_support(‘widgets-block-editor’);
}
add_action(‘after_setup_theme’, ‘ching_disable_block_widget’);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment