WordPress.org

Forums

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

  1. dan77
    Member
    Posted 3 years 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
    Font hero
    Posted 3 years 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 3 years 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
    Forum Moderator
    Posted 3 years 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. Michael
    Part-Time Forum Moderator
    Posted 3 years 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 3 years ago #

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

  7. dan77
    Member
    Posted 3 years ago #

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

  8. Taylor
    Member
    Posted 2 years ago #

    Hate to come in so late on this...but have a similar issue with Twenty Twelve and wanting to remove the "customize" menu link.

    I've already got the header and background removed but can't for the life of me figure out how to remove the customize menu.

  9. WPyogi
    Forum Moderator
    Posted 2 years ago #

    @Taylor - could you start a new thread - and include a link to your site. This one is resolved and your question isn't the same.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.