【问题标题】:Child themed template-tags.php儿童主题模板-tags.php
【发布时间】:2015-07-08 00:56:41
【问题描述】:

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

需要用子 template-tags.php 覆盖

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

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

有人知道怎么做吗?

【问题讨论】:

  • 在 WP 社区的帮助下找到了答案。
  • 答案是使用以下子函数。

标签: php wordpress templatetags


【解决方案1】:

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

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-07-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-03-06
    • 2013-12-03
    • 2018-04-20
    相关资源
    最近更新 更多