WordPress.org

Support

Support » How-To and Troubleshooting » Remove Theme Support not Working?

Remove Theme Support not Working?

  • I have a “twenty ten” child theme and I want to disable the Custom Header and Custom Background Support, I added this code to my functions.php but it is not working.

    /* Remove theme support for Background and Headers */
    function remove_custom_theme_support(){
    	remove_theme_support('custom-header');
    	remove_theme_support('custom-background');
    }
    add_action( 'after_setup_theme', 'remove_custom_theme_support', 11 );

    I have also tried

    /* Remove theme support for Background and Headers */
    function remove_custom_theme_support(){
    	remove_theme_support('custom-header');
    	remove_theme_support('custom-background');
    }
    add_action( 'init', 'remove_custom_theme_support' );

    The help is No Help

    The help says to add it to functions.php

    Allows a theme to de-register its support of a certain 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.

    Any help would be welcomed!

    David

Viewing 1 replies (of 1 total)
  • add_action('after_setup_theme', 'remove_custom_background');
    
    function remove_custom_background() {
    	global $_wp_theme_features;
    	unset($_wp_theme_features['custom-background']);
    }
Viewing 1 replies (of 1 total)
  • The topic ‘Remove Theme Support not Working?’ is closed to new replies.
Skip to toolbar