- Acme Themes
#5648
sidfilmz
Member

I did exactly as suggested, if you read my previous post. I copied the file & folder structure as ‘acmethemes/hooks/header.php’ into my Child Theme. The Child Theme is working if I override files such as footer.php, page.php, etc. — BUT when trying to override any files in the ‘acmethemes/hooks’ folder, it is not working.

I even copied ‘acmethemes/init.php’ over to my Child Theme to change:
require_once get_template_directory() . '/acmethemes/hooks/header.php';

to:
require_once get_stylesheet_directory() . '/acmethemes/hooks/header.php';

hoping to force the child theme to load that file from the child and not the parent, but it still does not.

My child theme function.php in it’s entirety:

<?php
// Exit if accessed directly
if ( !defined( 'ABSPATH' ) ) exit;

// BEGIN ENQUEUE PARENT ACTION

if ( !function_exists( 'chld_thm_cfg_parent_css' ) ):
    function chld_thm_cfg_parent_css() {
        wp_enqueue_style( 'chld_thm_cfg_parent', trailingslashit( get_template_directory_uri() ) . 'style.css', array( 'bootstrap','fontawesome','jquery-bxslider' ) );
    }
endif;
add_action( 'wp_enqueue_scripts', 'chld_thm_cfg_parent_css', 10 );

// END ENQUEUE PARENT ACTION

function new_widgets_init() {
    register_sidebar( array(
        'name'          => esc_html__( 'Header Widget' ),
        'id'            => 'header-widget',
        'description'   => '',
        'before_widget' => '<section id="%1$s" class="widget %2$s">',
        'after_widget'  => '</section>',
        'before_title'  => '<h2 class="widget-title">',
        'after_title'   => '</h2><div class="line"><span></span></div>',
    ) );

}
add_action( 'widgets_init', 'new_widgets_init' );

I have even tried both the following when trying to register the Widget, but I don’t think this is this issue:

        'name'          => esc_html__( 'Header Widget', 'corporate-plus' ),
        'name'          => esc_html__( 'Header Widget', 'corporate-plus-child' ),

and Child style.css begins with:

/*
Theme Name: Corporate Plus Child
Theme URI: http://www.acmethemes.com/themes/corporate-plus
Template: corporate-plus
Author: acmethemes
Author URI: http://www.acmethemes.com/
Version: 1.2.1.1465336348
Updated: 2016-06-07 21:52:28

*/