【问题标题】:wordpress child theme does not automatically load single-post_type.php from parentwordpress 子主题不会自动从父主题加载 single-post_type.php
【发布时间】:2021-12-02 01:05:27
【问题描述】:

我第一次尝试设置 wordpress 子主题。除了样式表和 javascript 文件等之外,父级还有用于自定义帖子类型和 header.php 和页脚的复杂模板。

子主题只需要更改css(暂时)。我的子主题只有style.cssfunctions.php

我已经在父主题文件夹中有一个用于自定义帖子类型product 的 single-product.php。那不是从父级自动加载的。请建议需要什么才能使其正常工作。

谢谢。

【问题讨论】:

    标签: php css wordpress wordpress-theming child-theming


    【解决方案1】:

    不是最好的解决方案,但可以提供帮助。 将header.php 复制到子主题中,并将您的css 放在<head> 部分。记得用<style>custom-css{...}</style>附上你的css

    【讨论】:

      猜你喜欢
      • 2019-02-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-04-16
      • 2017-06-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多