Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/remove theme support


Allows a theme to de-register its support of a certain theme feature. Should be called in the theme's functions.php file. Generally would be used for child themes to override support from the parent theme.


<?php remove_theme_support$feature ); ?>


(string) (required) Name for the feature being removed.
Features list:
Default: None

Return Values

Returns true if feature was removed, false otherwise.


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:

// in your Child Theme's functions.php    

// Use the after_setup_theme hook with a priority of 11 to load after the
// parent theme, which will fire on the default priority of 10
add_action( 'after_setup_theme', 'remove_featured_images_from_child_theme', 11 ); 

function remove_featured_images_from_child_theme() {

    // This will remove support for post thumbnails on ALL Post Types
    remove_theme_support( 'post-thumbnails' );

    // Add this line in to re-enable support for just Posts
    add_theme_support( 'post-thumbnails', array( 'post' ) );


Change Log

Source File

remove_theme_support() is located in wp-includes/theme.php.


Theme Support: add_theme_support(), remove_theme_support(), current_theme_supports()
Theme Features: sidebar, menus, post-formats, title-tag, custom-background, custom-header, custom-logo, post-thumbnails, automatic-feed-links, html5, editor-style, content_width

See also index of Function Reference and index of Template Tags.