3

我使用的主题有一个inc/template-tags.php文件,我

需要用子 template-tags.php 覆盖

将文件添加到基于 inc/ 文件夹和根子主题文件夹的子主题文件夹中似乎不会覆盖父文件。

添加include( get_stylesheet_directory() . '/inc/template-tags.php' ); 到我的孩子会functions.php导致 WordPress 白屏死机。

有人知道怎么做吗?

4

1 回答 1

7

答案是使用以下内部孩子functions.php

if( ! function_exists(twentyfourteen_post_nav) ) { function twentyfourteen_post_nav() { DUMP MY EDITED CODE HERE }}

于 2015-07-08T23:06:26.710 回答