On this page
remove_theme_support( string $feature ): bool|void
Allows a theme to de-register its support of a certain feature
Description
Should be called in the theme’s functions.php file. Generally would be used for child themes to override support from the parent theme.
See also
Parameters
$featurestring Required-
The feature being removed. See add_theme_support() for the list of possible values.
More Arguments from add_theme_support( ... $feature )
The feature being added. Likely core values include:
'admin-bar''align-wide''automatic-feed-links''core-block-patterns''custom-background''custom-header''custom-line-height''custom-logo''customize-selective-refresh-widgets''custom-spacing''custom-units''dark-editor-style''disable-custom-colors''disable-custom-font-sizes''editor-color-palette''editor-gradient-presets''editor-font-sizes''editor-styles''featured-content''html5''menus''post-formats''post-thumbnails''responsive-embeds''starter-content''title-tag''wp-block-styles''widgets''widgets-block-editor'
Return
bool|void Whether feature was removed.
Source
File: wp-includes/theme.php. View all references
function remove_theme_support( $feature ) {
// Do not remove internal registrations that are not used directly by themes.
if ( in_array( $feature, array( 'editor-style', 'widgets', 'menus' ), true ) ) {
return false;
}
return _remove_theme_support( $feature );
}
Related
Uses
| Uses | Description |
|---|---|
| _remove_theme_support() wp-includes/theme.php | Do not use. Removes theme support internally without knowledge of those not used by themes directly. |
Used By
| Used By | Description |
|---|---|
| remove_custom_image_header() wp-includes/deprecated.php | Remove image header support. |
| remove_custom_background() wp-includes/deprecated.php | Remove custom background support. |
Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/remove_theme_support