WordPress.org

Ready to get started?Download WordPress

Forums

Remove Theme Support not Working? (2 posts)

  1. Digital Raindrops
    Member
    Posted 3 years ago #

    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

  2. Andy Potanin
    Member
    Posted 3 years ago #

    add_action('after_setup_theme', 'remove_custom_background');
    
    function remove_custom_background() {
    	global $_wp_theme_features;
    	unset($_wp_theme_features['custom-background']);
    }

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.