Skip to:

BP1.2 – How to remove parent theme functions?

  • mkels


    using bp1.2beta in single wp


    i’m working on a child theme with bp-default as parent theme.

    without touching the parent theme, how do i remove the add_custom_image_header()

    that was already exist in parent theme? so i can use my own custom_image_header in

    child theme.

    now in child theme had 2 custom header menu and 2 upload header form in ?page=page-header.


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

  • mfgmk


    it’s gonna be in your functions.php file around line 113, but i’m not sure if you can edit that file when you’re designing a child theme… already asked about it, so i’ll keep you posted on that since i’m hung up on that same issue. alternatively, you could just use the custom header option in the Appearance section to change your header.

    define( ‘HEADER_TEXTCOLOR’, ‘FFFFFF’ );

    define( ‘HEADER_IMAGE’, ‘%s/_inc/images/default_header.jpg’ ); // %s is theme dir uri

    define( ‘HEADER_IMAGE_WIDTH’, 1250 );

    define( ‘HEADER_IMAGE_HEIGHT’, 125 );

    function bp_dtheme_header_style() { ?>
    <style type="text/css">
    #header { background-image: url(<?php header_image() ?>); }
    <?php if ( 'blank' == get_header_textcolor() ) { ?>
    #header h1, #header #desc { display: none; }
    <?php } else { ?>
    #header h1 a, #desc { color:#<?php header_textcolor() ?>; }
    <?php } ?>



    i think i found a solution to this problem.

    since add_custom_image_header already declared in parent theme, i just need to

    add this line code to use my own setting of custom image header and good news is

    there no double image header and header menu.


    /// inherit parent theme header to child theme


    define('HEADER_TEXTCOLOR', '');

    define('HEADER_IMAGE_WIDTH', 988); //width is differ from parent

    define('HEADER_IMAGE_HEIGHT', 125); //height is differ from parent

    define('NO_HEADER_TEXT', true ); //turn this off in child theme

    function my_admin_header_style() { ?>

    <style type="text/css">

    #headimg { height: <?php echo HEADER_IMAGE_HEIGHT; ?>px !important; background: #fff url(<?php header_image() ?>) repeat-x; }

    #headimg { height: <?php echo HEADER_IMAGE_HEIGHT; ?>px !important; width: <?php echo HEADER_IMAGE_WIDTH; ?>px !important; }

    #headimg h1, #headimg #desc { display: none !important; }


    <?php }

    // no need to recalled add_custom_image_header()..just add action to style it

    add_action('admin_head', 'my_admin_header_style');

    and now only 1 custom header admin menu and 1 header upload form.

    thanks for chipping in:)




    np… also, @andy just updated the bp codex way at the bottom. thought you might wanna know =)



    Just in case anyone’s got the same issue and doesn’t want the custom header function in their child theme:

    define( ‘BP_DTHEME_DISABLE_CUSTOM_HEADER’, true );

    add the snippet above in your functions.php

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘BP1.2 – How to remove parent theme functions?’ is closed to new replies.
Skip to toolbar