remove_theme_support( string $feature )
Allows a theme to de-register its support of a certain feature
Contents
Description 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 See also
Parameters Parameters
- $feature
-
(string) (Required) The feature being removed.
Return Return
(bool|void) Whether feature was removed.
Source Source
File: wp-includes/theme.php
function remove_theme_support( $feature ) { // Blacklist: for internal registrations not used directly by themes. if ( in_array( $feature, array( 'editor-style', 'widgets', 'menus' ) ) ) { return false; } return _remove_theme_support( $feature ); }
Expand full source code Collapse full source code View on Trac
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |
User Contributed Notes User Contributed Notes
You must log in before being able to contribute a note or feedback.
Removing a Feature In a Child Theme
In some cases, a Parent Theme may have activated a feature that you do not want to have available in your Child Theme. For instance, if you are using a parent theme that has activated Featured Images for all Pages and Posts, but you’d like to remove the functionality of having Featured Images for Pages in your Child Theme, you could do something like this:
Expand full source codeCollapse full source code