Created
June 30, 2023 22:19
-
-
Save BronsonQuick/3249ee8f6b65272d6a0a387d51b2a19e to your computer and use it in GitHub Desktop.
Remove the default Patterns included into WordPress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Prevent the loading of patterns from the WordPress.org Pattern Directory | |
*/ | |
add_filter( 'should_load_remote_block_patterns', '__return_false' ); | |
/** | |
* Remove patterns that ship with WordPress Core. | |
*/ | |
function bbfs_remove_core_block_patterns() { | |
remove_theme_support( 'core-block-patterns' ); | |
} | |
add_action( 'after_setup_theme', 'bbfs_remove_core_block_patterns' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment