• I want to modify a file (custom_meta_boxes.php). I copy from the parent directory, edit it and upload to the child-theme/includes directory.

    As what I understand, the parent functions.php is call after the child’s functions.php. And I’m back to square one as the actual php file called is the one from the parent directory.

    My question is, how to stop the parent functions from loading that particular code (php file) and thus overriding the one loaded earlier from the child-theme/includes directory?

    Child’s functions.php

    include('includes/layout-new.php');
    include_once(STYLESHEETPATH .'/designs.php');
    include_once(STYLESHEETPATH .'/gamingoptions.php');
    include('includes/toptable.php');
    include('includes/page-new.php');
    include_once(TEMPLATEPATH .'/includes/custom_meta_boxes.php');

    Parent’s functions.php

    include_once(TEMPLATEPATH .'/includes/custom-type-templates.php');
    include_once(TEMPLATEPATH .'/includes/options.lib.php');
    include_once(TEMPLATEPATH .'/includes/design-options.php');
    include_once(TEMPLATEPATH .'/includes/theme-options.php');
    include_once(TEMPLATEPATH .'/includes/seo-options.php');
    include_once(TEMPLATEPATH .'/includes/gambling-options.php');
    include_once(TEMPLATEPATH .'/includes/breadcrumbs.php');
    include_once(TEMPLATEPATH .'/includes/topsites_widget.php');
    include_once(TEMPLATEPATH .'/includes/sitelistings_widget.php');
    include_once(TEMPLATEPATH .'/includes/custom_meta_boxes.php');
    include_once(TEMPLATEPATH .'/includes/banner-manager.php');
    include_once(TEMPLATEPATH .'/includes/shortcodes.php');
    include_once(TEMPLATEPATH .'/includes/featured_widget.php');
    include_once(TEMPLATEPATH .'/includes/redirects.php');
    include_once(TEMPLATEPATH .'/includes/shortcode_builder.php');
    include_once(TEMPLATEPATH .'/includes/excerpt_shortcode_builder.php');
    include_once(TEMPLATEPATH .'/includes/ftable_shortcode_builder.php');
    include_once(TEMPLATEPATH .'/includes/hitcounter.php');

    All helps are appreciated.

    🙂

  • The topic ‘Duplicate "include" in child theme and parent’ is closed to new replies.