Forums

Twenty Twelve
[resolved] [Theme: twenty twelve] remove custom header in parent theme (7 posts)

  1. dan77
    Member
    Posted 4 months ago #

    I'm trying for a while now to remove completely the custom header.
    but because twentytwelve is using it with
    require( get_template_directory() . '/inc/custom-header.php' );
    I couldn't just do the remove_theme_support() trick.
    creating that directory with an empty custom_header.php in the child theme didn't work out, either.
    same as trying to remove the function called in the custom_header template
    remove_action( 'after_setup_theme', 'twentytwelve_custom_header_setup', 11);
    in different variations. no success :(

    Can someone help out, please! thanks!

  2. paulwpxp
    A Legend
    Posted 4 months ago #

    You can go with CSS only.

    .header-image {display:none;}

    or use the code from the 1st comment here
    http://core.trac.wordpress.org/ticket/23157#comment:1

  3. dan77
    Member
    Posted 4 months ago #

    :)
    that's true !
    but I want it to disappear in the backend, that the customers wont play around with it.

    and as far as I know, it wont be good for page load, since it will still load the image..

    thanks anyway!

  4. esmi
    Theme Diva & Forum Moderator
    Posted 4 months ago #

    I want it to disappear in the backend, that the customers wont play around with it.

    So just give them Editor logins for general day-to-day use.

  5. alchymyth
    The Sweeper & Moderator
    Posted 4 months ago #

    try this in functions.php of the child theme:

    function twentytwelvechild_remove_custom_header() {
    remove_theme_support( 'custom-header' );
    }
    add_action( 'after_setup_theme', 'twentytwelvechild_remove_custom_header', 11 );
  6. dan77
    Member
    Posted 4 months ago #

    thanks alchymyth,
    that did it!!
    thanks a lot for that fast and easy solution!

  7. dan77
    Member
    Posted 4 months ago #

    thank you as well esmi! that is even a more considered solution
    regarding the fact of clients messing things up :)

Reply

You must log in to post.

About this Theme

About this Topic

Tags

No tags yet.