{"id":31,"date":"2024-10-03T11:48:16","date_gmt":"2024-10-03T16:48:16","guid":{"rendered":"https:\/\/id-developer-upgrade-58.cms-devl.bu.edu\/gutenberg\/?page_id=31"},"modified":"2025-02-20T14:07:37","modified_gmt":"2025-02-20T19:07:37","slug":"theme-supports","status":"publish","type":"page","link":"https:\/\/id-developer-upgrade-58.cms-devl.bu.edu\/gutenberg\/best-practices\/bu-child-starter\/theme-supports\/","title":{"rendered":"Theme Supports"},"content":{"rendered":"\n<p>WordPress supplies hooks that allow a developer to de\/activate certain features of the block editor. Within the child theme starter, certain theme supports have been active, and other deactivated. Within the child theme, the developer can un\/comment the feature for the specific project within the <code>theme-support.php<\/code> file. <\/p>\n\n\n\n<p>The <a rel=\"noreferrer noopener\" href=\"https:\/\/developer.wordpress.org\/block-editor\/how-to-guides\/themes\/theme-support\/\" target=\"_blank\">WordPress Block Developer handbook<\/a> provides an overview of Theme Supports and all the options available up to the latest version of WordPress. <\/p>\n\n\n\n<h2><a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/add_theme_support\/\">Default active theme support<\/a><\/h2>\n\n\n\n<ul><li><code>align-wide<\/code><br><a href=\"https:\/\/developer.wordpress.org\/block-editor\/how-to-guides\/themes\/theme-support\/#wide-alignment\">Allow blocks such as the image block have the possibility to define a \u201cwide\u201d or \u201cfull\u201d alignment.<\/a><\/li><li><code>disable-custom-colors<\/code><br><a href=\"https:\/\/developer.wordpress.org\/block-editor\/how-to-guides\/themes\/theme-support\/#disabling-custom-colors-in-block-color-palettes\">Disable the color palette offered to blocks that allows the user to select a custom color different from the editor or theme default colors.<\/a><\/li><li><code>disable-custom-font-sizes<\/code><br><a href=\"https:\/\/developer.wordpress.org\/block-editor\/how-to-guides\/themes\/theme-support\/#disabling-custom-font-sizes\">Disable the ability to set custom font sizes.<\/a><\/li><li><code>disable-custom-gradients<\/code><br><a href=\"https:\/\/developer.wordpress.org\/block-editor\/how-to-guides\/themes\/theme-support\/#disabling-custom-gradients\">Disable the ability to set a custom gradient.<\/a><\/li><li><code>editor-font-sizes<\/code><br><a href=\"https:\/\/developer.wordpress.org\/block-editor\/how-to-guides\/themes\/theme-support\/#block-font-sizes\">The block provides a default set of font sizes, but a theme can overwrite it and provide its own.<\/a><\/li><li><code>editor-styles<\/code><br><a href=\"https:\/\/developer.wordpress.org\/block-editor\/how-to-guides\/themes\/theme-support\/#enqueuing-the-editor-style\">Enqueue and load CSS on the editor screen. For the classic editor, this was the only function needed to add style to the editor. For the new block editor, you also need to use <code>add_editor_style<\/code>. This feature is automatically enabled for block themes, and does not need to be included during theme setup.<\/a><\/li><li><code>html5<\/code><br>This feature is automatically enabled for block themes, and does not need to be included during theme setup.<\/li><li><code>post-thumbnails<\/code><br><a href=\"https:\/\/developer.wordpress.org\/themes\/basics\/theme-functions\/\">Post thumbnails and featured images allow your users to choose an image to represent their post. This feature is automatically enabled for block themes, and does not need to be included during theme setup.<\/a><\/li><li><code>responsive-embeds<\/code><br><em> <\/em>To make the content resize and keep its aspect ratio, the &lt;body&gt; element needs the <code>wp-embed-responsive<\/code> class. This is not set by default, and requires the theme to opt in to the responsive-embeds feature.<\/li><li><code>wp-block-styles<\/code><\/li><\/ul>\n\n\n\n<h2><a href=\"https:\/\/developer.wordpress.org\/reference\/functions\/remove_theme_support\/\">Default removed theme support<\/a><\/h2>\n\n\n\n<ul><li><code>automatic-feed-links<\/code><br><a href=\"https:\/\/developer.wordpress.org\/themes\/basics\/theme-functions\/\">Enables post and comment RSS feeds by default. This feature is automatically enabled for block themes, and does not need to be included during theme setup.<\/a><\/li><li><code>block-templates<\/code><\/li><li><code>core-block-patterns<\/code><br><a href=\"https:\/\/developer.wordpress.org\/block-editor\/how-to-guides\/themes\/theme-support\/#disabling-the-default-block-patterns\">WordPress comes with a number of block patterns built-in, themes can opt-out of the bundled patterns and provide their own set.<\/a><\/li><li><code>custom-background<\/code><\/li><li><code>custom-header<\/code><\/li><li><code>custom-line-height<\/code><br><a href=\"https:\/\/developer.wordpress.org\/block-editor\/how-to-guides\/themes\/theme-support\/#supporting-custom-line-heights\">Some blocks like paragraph and headings support customizing the line height.<\/a><\/li><li><code>widgets-block-editor<\/code><br><a href=\"https:\/\/developer.wordpress.org\/block-editor\/how-to-guides\/widgets\/opting-out\/\">Disabled Widget Block Editor<\/a><\/li><\/ul>\n\n\n\n<h2>Below are some optional settings to activate<\/h2>\n\n\n\n<ul><li><code>admin-bar<\/code><\/li><li><code>custom-logo<\/code><\/li><li><code>customize-selective-refresh-widgets<\/code><\/li><li><code>custom-spacing<\/code><br><a href=\"https:\/\/developer.wordpress.org\/block-editor\/how-to-guides\/themes\/theme-support\/#spacing-control\">Some blocks can have padding controls. This is off by default.<\/a><\/li><li><code>custom-units<\/code><br><a href=\"https:\/\/developer.wordpress.org\/block-editor\/how-to-guides\/themes\/theme-support\/#support-custom-units\">In addition to pixels, users can use other units to define sizes, paddings\u2026 The available units are: px, em, rem, vh, vw.<\/a><\/li><li><code>dark-editor-style<\/code><\/li><li><code>featured-content<\/code><\/li><li><code>menus<\/code><\/li><li><code>post-formats<\/code><br><a href=\"https:\/\/developer.wordpress.org\/themes\/basics\/theme-functions\/\">Post formats allow users to format their posts in different ways.<\/a><\/li><li><code>starter-content<\/code><\/li><li><code>title-tag<\/code><\/li><li><code>widgets<\/code><\/li><\/ul>\n\n\n\n<h3>Additional settings available in future versions of WordPress<\/h3>\n\n\n\n<ul><li><code>appearance-tools<\/code><\/li><li><strong>WP 6.5<\/strong> <a href=\"https:\/\/developer.wordpress.org\/block-editor\/how-to-guides\/themes\/theme-support\/#appearance-tools\">Enable the WP Global Styles settings.<\/a><\/li><li><code>block-template-parts<\/code><\/li><li><strong>WP 6.1<\/strong> <a href=\"https:\/\/developer.wordpress.org\/block-editor\/how-to-guides\/themes\/theme-support\/#block-based-template-parts\">Enable Block Based Template parts, allowing administrators to edit parts of the site using blocks. This is off by default.<\/a><\/li><li><code>border<\/code><\/li><li><strong>WP 6.3<\/strong> <a href=\"https:\/\/developer.wordpress.org\/block-editor\/how-to-guides\/themes\/theme-support\/#border\">Enable all border settings.<\/a><\/li><li><code>disable-layout-styles<\/code><\/li><li><strong>WP 6.1<\/strong> <a href=\"https:\/\/developer.wordpress.org\/block-editor\/how-to-guides\/themes\/theme-support\/#disabling-base-layout-styles\">By enabling the following code, themes commit to providing their own structural styling, as using this feature will result in core blocks displaying incorrectly in both the editor and site frontend.<\/a> <\/li><li><code>link-color<\/code><\/li><\/ul>\n\n\n\n<h3>These settings cannot be activated within the <code>setup_theme_supported_features<\/code> function, due to additional configurations settings<\/h3>\n\n\n\n<p><em>Note: these can be set in <code>theme.json<\/code> which is usually preferred.<\/em><\/p>\n\n\n\n<ul><li><code>custom_units<\/code><\/li><li><code>editor-color-palette<\/code><\/li><li><code>editor-gradient-presets<\/code><\/li><li><code>editor-font-size<em>s<\/em><\/code><\/li><\/ul>\n\n\n\n<h2>Options that can be switched via <code>theme.json<\/code><\/h2>\n\n\n\n<ul><li><a href=\"https:\/\/developer.wordpress.org\/block-editor\/reference-guides\/theme-json-reference\/theme-json-v1\/\">WordPress 5.8 uses V1 of <code>theme.json<\/code><\/a><br><a href=\"https:\/\/raw.githubusercontent.com\/WordPress\/gutenberg\/wp\/5.8\/schemas\/json\/theme.json\">schema<\/a><\/li><li><a href=\"https:\/\/developer.wordpress.org\/block-editor\/reference-guides\/theme-json-reference\/theme-json-v2\/\">WordPress 5.9-6.5 uses V2<\/a><br><a href=\"https:\/\/schemas.wp.org\/wp\/6.5\/theme.json\">schema<\/a><\/li><li><a href=\"https:\/\/developer.wordpress.org\/block-editor\/reference-guides\/theme-json-reference\/theme-json-living\/\">WordPress 6.6+ uses V3<\/a><br><a href=\"https:\/\/schemas.wp.org\/trunk\/theme.json\">schema<\/a><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>WordPress supplies hooks that allow a developer to de\/activate certain features of the block editor. Within the child theme starter, certain theme supports have been active, and other deactivated. Within the child theme, the developer can un\/comment the feature for the specific project within the theme-support.php file. The WordPress Block Developer handbook provides an overview [&hellip;]<\/p>\n","protected":false},"author":3670,"featured_media":0,"parent":18,"menu_order":4,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"status-is-a-reserved-term":[],"assignee":[],"_links":{"self":[{"href":"https:\/\/id-developer-upgrade-58.cms-devl.bu.edu\/gutenberg\/wp-json\/wp\/v2\/pages\/31"}],"collection":[{"href":"https:\/\/id-developer-upgrade-58.cms-devl.bu.edu\/gutenberg\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/id-developer-upgrade-58.cms-devl.bu.edu\/gutenberg\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/id-developer-upgrade-58.cms-devl.bu.edu\/gutenberg\/wp-json\/wp\/v2\/users\/3670"}],"replies":[{"embeddable":true,"href":"https:\/\/id-developer-upgrade-58.cms-devl.bu.edu\/gutenberg\/wp-json\/wp\/v2\/comments?post=31"}],"version-history":[{"count":7,"href":"https:\/\/id-developer-upgrade-58.cms-devl.bu.edu\/gutenberg\/wp-json\/wp\/v2\/pages\/31\/revisions"}],"predecessor-version":[{"id":417,"href":"https:\/\/id-developer-upgrade-58.cms-devl.bu.edu\/gutenberg\/wp-json\/wp\/v2\/pages\/31\/revisions\/417"}],"up":[{"embeddable":true,"href":"https:\/\/id-developer-upgrade-58.cms-devl.bu.edu\/gutenberg\/wp-json\/wp\/v2\/pages\/18"}],"wp:attachment":[{"href":"https:\/\/id-developer-upgrade-58.cms-devl.bu.edu\/gutenberg\/wp-json\/wp\/v2\/media?parent=31"}],"wp:term":[{"taxonomy":"status-is-a-reserved-term","embeddable":true,"href":"https:\/\/id-developer-upgrade-58.cms-devl.bu.edu\/gutenberg\/wp-json\/wp\/v2\/status-is-a-reserved-term?post=31"},{"taxonomy":"assignee","embeddable":true,"href":"https:\/\/id-developer-upgrade-58.cms-devl.bu.edu\/gutenberg\/wp-json\/wp\/v2\/assignee?post=31"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}