Title: Cannot remove custom-header in child theme
Last modified: December 8, 2018

---

# Cannot remove custom-header in child theme

 *  [dansperfect](https://wordpress.org/support/users/dansperfect/)
 * (@dansperfect)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/cannot-remove-custom-header-in-child-theme/)
 * Ok so im making a secondary child theme for my site that will be used for mobile.
   I want to remove the custom header on this secondary child theme while the main
   child theme has it active. So in the secondary theme in functions.php I added.
 * add_action( ‘after_setup_theme’, ‘remove_custom_header’, 11 );
 * function remove_custom_header() {
 * remove_theme_support( ‘custom-header’ );
 * }
 * But the damned custom-header persists. Any help would be nice here.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcannot-remove-custom-header-in-child-theme%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [kword](https://wordpress.org/support/users/kw56/)
 * (@kw56)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/cannot-remove-custom-header-in-child-theme/#post-10957050)
 * You can use CSS Media Queries to hide header for small devices
 *     ```
       @media screen and (max-width: 600px) {
         .custom-header-class {
           display: none;
         }
       }
       ```
   
 *  Thread Starter [dansperfect](https://wordpress.org/support/users/dansperfect/)
 * (@dansperfect)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/cannot-remove-custom-header-in-child-theme/#post-10958201)
 * I would normally do something like this but for mobile speed and seo improvemwnts
   that would worsen the problem by adding more code. I need the header code to 
   never be called and no image rendered with the css it still downloads the large
   images and renders it.
 *  [kword](https://wordpress.org/support/users/kw56/)
 * (@kw56)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/cannot-remove-custom-header-in-child-theme/#post-10958301)
 * Then try suggestions from this discussion
 * [https://wordpress.stackexchange.com/questions/9490/removing-custom-background-and-header-feature-in-child-theme](https://wordpress.stackexchange.com/questions/9490/removing-custom-background-and-header-feature-in-child-theme)
 *  Thread Starter [dansperfect](https://wordpress.org/support/users/dansperfect/)
 * (@dansperfect)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/cannot-remove-custom-header-in-child-theme/#post-10958837)
 * thank you I will try this out in a little bit
 *  Thread Starter [dansperfect](https://wordpress.org/support/users/dansperfect/)
 * (@dansperfect)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/cannot-remove-custom-header-in-child-theme/#post-10960677)
 * So according to that post it should look like this. This does once again this
   doesn’t work to remove the image header. I don’t know what can be done. I have
   tried contacting the developer of the theme but it seems he’s not around anymore
   as he isn’t responding.
 *     ```
       add_action( 'after_setup_theme', 'remove_custom_header', 11 );
   
             function remove_custom_header() {
   
                     $GLOBALS['custom_image_header'] = 'kill_theme_features';
       }
       class kill_theme_features {
   
             function init() {return false;}
   
       }
       ```
   
 * Maybe someone can recommend a nice mobile theme that I can customize? Instead
   of me wasting time on trying to convert this one to mobile

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Cannot remove custom-header in child theme’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 2 participants
 * Last reply from: [dansperfect](https://wordpress.org/support/users/dansperfect/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/cannot-remove-custom-header-in-child-theme/#post-10960677)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
