{"id":46372,"date":"2025-03-23T09:00:19","date_gmt":"2025-03-23T09:00:19","guid":{"rendered":"https:\/\/code.dplugins.com\/?p=46372"},"modified":"2025-03-23T09:01:15","modified_gmt":"2025-03-23T09:01:15","slug":"disable-default-block-theme-patterns","status":"publish","type":"post","link":"https:\/\/code.dplugins.com\/disable-default-block-theme-patterns\/","title":{"rendered":"Disable default block theme patterns"},"content":{"rendered":"\n<p><br>To disable the default block patterns in WordPress (so only your custom patterns are available), use the following method in your custom blank theme:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"php\" class=\"language-php\">&lt;?php\nif ( ! defined( 'ABSPATH' ) ) {\n    exit;\n}\n\nadd_action('init', function() {\n    remove_theme_support('core-block-patterns'); \/\/ Disable default block patterns\n});\n\nadd_filter('should_load_remote_block_patterns', '__return_false'); \/\/ Prevent fetching patterns from WordPress<\/code><\/pre>\n\n\n\n<p>Add this to the <mark style=\"background-color:#83eafb\" class=\"has-inline-color\">functions.php<\/mark> or you can use code snippet editors.<\/p>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button\"><a class=\"wp-block-button__link wp-element-button\" href=\"https:\/\/dplugins.com\/downloads\/scripts-organizer\/\" target=\"_blank\" rel=\"noreferrer noopener\">Try Scripts Organizer<\/a><\/div>\n<\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To disable the default block patterns in WordPress (so only your custom patterns are available), use the following method in your custom blank theme: Add this to the functions.php or you can use code snippet editors.<\/p>\n","protected":false},"author":1,"featured_media":46373,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"slim_seo":{"title":"Disable default block theme patterns - Code DPlugins","description":"To disable the default block patterns in WordPress (so only your custom patterns are available), use the following method in your custom blank theme: Add this t"},"footnotes":""},"categories":[90],"tags":[],"class_list":["post-46372","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-gutenberg"],"_links":{"self":[{"href":"https:\/\/code.dplugins.com\/wp-json\/wp\/v2\/posts\/46372","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/code.dplugins.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/code.dplugins.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/code.dplugins.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/code.dplugins.com\/wp-json\/wp\/v2\/comments?post=46372"}],"version-history":[{"count":2,"href":"https:\/\/code.dplugins.com\/wp-json\/wp\/v2\/posts\/46372\/revisions"}],"predecessor-version":[{"id":46375,"href":"https:\/\/code.dplugins.com\/wp-json\/wp\/v2\/posts\/46372\/revisions\/46375"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/code.dplugins.com\/wp-json\/wp\/v2\/media\/46373"}],"wp:attachment":[{"href":"https:\/\/code.dplugins.com\/wp-json\/wp\/v2\/media?parent=46372"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/code.dplugins.com\/wp-json\/wp\/v2\/categories?post=46372"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/code.dplugins.com\/wp-json\/wp\/v2\/tags?post=46372"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}