Skip to content

Instantly share code, notes, and snippets.

@BronsonQuick
Created June 30, 2023 22:19
Show Gist options
  • Save BronsonQuick/3249ee8f6b65272d6a0a387d51b2a19e to your computer and use it in GitHub Desktop.
Save BronsonQuick/3249ee8f6b65272d6a0a387d51b2a19e to your computer and use it in GitHub Desktop.
Remove the default Patterns included into WordPress
<?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