【发布时间】:2017-05-20 03:42:35
【问题描述】:
我正在尝试反转基于我的测试位于内部的标题徽标标题的样式
/wp-content/themes/<theme-name>/inc/partials.php
由于文件在Parent主题下,我需要将这个文件复制到子主题目录下
/wp-content/themes/<theme-name>-child/inc/partials.php
但是,我似乎无法在我的子主题中复制它。
例如,在Parent主题目录中,如果我反转下面的代码块:
<h2 class="site-title"><a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a></h2>
更改会反映在主页的标题部分,但如果相同的更改应用于子主题的文件版本,则不会反映任何更改。
我在 Parent 主题上看到,
partials.php
包含在
中functions.php
按照下面的代码sn-p:
/** Standard Includes */
$includes = array(
'<other-files>.php',
'<other-files>.php,
'partials.php',
'<other-files>.php',
);
foreach ( $includes as $file ) {
require( get_template_directory() . '/inc/' . $file );
}
在里面复制这段代码
functions.php
在子主题目录上不起作用。
我该怎么办?我错过了什么? TIA
【问题讨论】:
标签: wordpress wordpress-theming