Здравствуйте!
Есть в родительской теме файл, например:
theme/include/header.php
я создаю каталог в дочерней теме, копирую из родительской темы файл, который хочу поправить - получается
/theme-child/include/header.php
Делаю изменения в нём, но ничего не происходит. В родительской правлю изменяется, что я делаю не так?
UPD
Итак. Есть файл
theme/header.php. В нём
<header id="masthead" class="site-header" role="banner" <?php if ( get_header_image() != '' ) { echo 'style="background-image: url(' . esc_url( get_header_image() ) . ');"'; } ?>>
<div class="col-full">
<?php
/**
* @hooked storefront_skip_links - 0
* @hooked storefront_social_icons - 10
* @hooked storefront_site_branding - 20
* @hooked storefront_secondary_navigation - 30
* @hooked storefront_product_search - 40
* @hooked storefront_primary_navigation - 50
* @hooked storefront_header_cart - 60
*/
do_action( 'storefront_header' ); ?>
</div>
</header><!-- #masthead -->
В файле
theme/structure/inc/header.php конструкции подобные этой
if ( ! function_exists( 'storefront_site_branding' ) ) {
/**
* Display Site Branding
* @since 1.0.0
* @return void
*/
function storefront_site_branding() {
if ( function_exists( 'jetpack_has_site_logo' ) && jetpack_has_site_logo() ) {
jetpack_the_site_logo();
} else { ?>
<div class="site-branding">
<div class="site-logo">
<img src="http://site.ru/images/logo-white_tran.png" class="" >
</div>
<div class="site-name">
<h1 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h1>
<?php if ( '' != get_bloginfo( 'description' ) ) { ?>
<p class="site-description"><?php echo bloginfo( 'description' ); ?></p>
</div>
<?php } ?>
</div>
<?php }
}
}
Ну и файл
theme/structure/inc/hooks.php:
/**
* Header
* @see storefront_skip_links()
* @see storefront_secondary_navigation()
* @see storefront_site_branding()
* @see storefront_primary_navigation()
*/
add_action( 'storefront_header', 'storefront_skip_links', 0 );
add_action( 'storefront_header', 'storefront_site_branding', 20 );
add_action( 'storefront_header', 'storefront_secondary_navigation', 30 );
add_action( 'storefront_header', 'storefront_primary_navigation', 50 );