• 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 to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • 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

    (@dansperfect)

    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.

    Thread Starter dansperfect

    (@dansperfect)

    thank you I will try this out in a little bit

    Thread Starter dansperfect

    (@dansperfect)

    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.