WordPress 主题“错误:主题将自身定义为其父主题。请检查模板标头。”

2024-04-30

In my WordPress Website's Themes Area I am getting strange message - "ERROR: The theme defines itself as its parent theme. Please check the Template header." enter image description here I Cannot Figure out what is Wrong. Please help me.

The header.php文件代码如下:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title><?php wp_title( '|', true, 'right' ); ?></title>
  <?php wp_head(); ?>
  <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>"/>
  <link rel="icon" type="image/png" href="<?php bloginfo('stylesheet_directory'); ?>/Images/favicon.gif" />
  <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/Font/font-awesome-4.0.3/css/font-awesome.min.css">
</head>
<body class="custom-background">
  <div id="wrap">
    <div id="header">
      <a href="<?php echo esc_url( home_url( '/' ) ); ?>">
            <img src="<?php header_image(); ?>" height="<?php echo get_custom_header()->height; ?>" width="<?php echo get_custom_header()->width; ?>" alt="fortuneshop9999" />
      </a>
    </div>
    <!--Google Translator-->
    <div id="google_translate_element">
            </div>
            <script type="text/javascript">
                function googleTranslateElementInit() {
                    new google.translate.TranslateElement({ pageLanguage: 'nl', layout: google.translate.TranslateElement.InlineLayout.SIMPLE }, 'google_translate_element');
                }
            </script>
            <script type="text/javascript" src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
    <!--End-->
    <div id="nav">
      <div>
        <ul>
          <?php wp_nav_menu( array( 'theme_location' => 'main-menu', 'container' => '', 'menu_class' => 'mainMenu' ) );?>
        </ul>
      </div>
    </div>
    <div id="subnav">
      <ul>
        <li class="menu-facebook">
          <a href="https://www.facebook.com" target="_blank">Facebook</a>
        </li>
        <li class="menu-twitter">
          <a href="http://www.twitter.com" target="_blank">Twitter</a>
        </li>
        <li class="menu-email">
          <a href="mailto:[email protected] /cdn-cgi/l/email-protection" target="_blank">Email</a>
        </li>
        <li class="menu-pinterest">
          <a href="http://www.pinterest.com" target="_blank">Pinterest</a>
        </li>
      </ul>
      <form class="search" method="get" id="searchform" action="<?php bloginfo('home'); ?>/">
        <input type="text" value="<?php echo wp_specialchars($s, 1); ?>" name="s" id="s" placeholder="Search here"/>
        <input type="submit" id="submit" value=""/>
      </form>
    </div>

The 样式.css代码是:

    /*
 Theme Name:   Yogi7
 Theme URI:    http://www.myotcworld.com/website-package.aspx
 Author:       Yogi
 Author URI:   http://www.myotcworld.com/website-package.aspx
 Template:     yogi7
 Version:      1.0.0
*/
body.custom-background {
    background-attachment: scroll;
    background: url("Images/seamless-stone-background.jpg" ); /*background:#FDE6E0;*/
    background-position: left top;
    background-repeat: repeat;
}

body {
    background: none repeat scroll 0 0 #FFFFFF;
    color: #4A4A4A;
    font-family: "Times New Roman",Times,serif;
    font-size: 14px;
    margin: 0 auto 30px;
    padding: 0;
}

#header {
    width: 960px;
    height: 285px;
    background: url("Images/header.png") no-repeat;
}
....

我删除了模板:yogi7从我的顶部样式.css主题文件。这解决了问题。

这就是如何样式.css现在看。

/*
Theme Name:   Yogi7
Theme URI:    http://www.myotcworld.com/website-package.aspx
Author:       Yogi
Author URI:   http://www.myotcworld.com/website-package.aspx
Version:      1.0.0
*/
body.custom-background {
    background-attachment: scroll;
    background: url("Images/seamless-stone-background.jpg" ); /*background:#FDE6E0;*/
    background-position: left top;
    background-repeat: repeat;
}

body {
    background: none repeat scroll 0 0 #FFFFFF;
    color: #4A4A4A;
    font-family: "Times New Roman",Times,serif;
    font-size: 14px;
    margin: 0 auto 30px;
    padding: 0;
}
......

希望这对其他人有帮助。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

WordPress 主题“错误:主题将自身定义为其父主题。请检查模板标头。” 的相关文章

  • PHP 文件上传帮助

    div align center div 这是我的代码
  • Laravel - 停止并发访问记录

    在 Laravel 中 有什么方法可以停止同时与同一条记录交互 例如 如果用户 A 正在编辑一条记录 那么我同时需要阻止用户 B 编辑同一条记录 注意 我在 Laravel 5 2 中使用 SESSION DRIVER file 目前大约有
  • 关于加拿大短信网关提供商的建议[关闭]

    Closed 这个问题是无关 help closed questions 目前不接受答案 我很好奇 如果我能够接受传入的短信到某个号码 然后将其传递给 PHP 中的服务器端应用程序 会带来多少麻烦 金钱 我最终会通过电子邮件地址发回短信 有
  • 如何在 Zend Framework 中存储 cron 作业的脚本?

    因为 ZF 的所有 URL 都依赖于 mod 重写 所以我并不清楚应该在哪里存储用于 cron 作业的本地脚本 有人有什么建议 或者有 正式接受 的方式吗 我用模块化目录结构 http framework zend com manual e
  • 覆盖供应商自动加载编辑器

    有没有办法让您创建的自动加载文件在调用供应商自动加载之前运行 我们似乎遇到了 SimpleSAML 的自动加载覆盖我们创建的自动加载文件之一的问题 我是 Composer 的新手 似乎无法在网上找到任何解决方案 我尝试将我们的自动加载文件包
  • Zend IMAP 搜索和过滤器

    我如何使用 Gmail 中的过滤器进行搜索 就像获取带有特定标签的电子邮件列表或来自特定电子邮件地址的邮件列表一样 我无法在文档中找到它 注意 我使用 oAuth 进行身份验证 我希望这与搜索无关 Gmail 上的标签实际上是 从 IMAP
  • strlen()==0 和empty()之间有区别吗?

    我正在查看其他人编写的一些表单验证代码 我看到了这个 strlen 0 当测试表单变量是否为空时 我使用empty 功能 一种方法比另一种方法更好吗 它们在功能上等效吗 strlen是获取字符串中的字符数 同时empty用于测试变量是否为空
  • Node.js 中的 PHP exit()/die() 等价物是什么

    什么是 PHP die http www php net manual de function die php http www php net manual de function die php 在 Node js 中等效吗 https
  • 如何以编程方式获取 WooCommerce 中的所有产品?

    我想获取 WooCommerce 中的所有产品数据 产品 sku 名称 价格 库存数量 可用性等 我可以使用 wp query 来做到这一点吗 这样你就可以通过 wp query 获取所有产品 global wpdb all product
  • PHP 中的 Preg_replace

    我想替换 中包含的字符串中的内容content 它是多行等 preg replace 函数应该删除整个 com 没有垫子 蒙特 尝试这个 result preg replace s replacement content subject
  • Laravel 5.2 带有可变参数的命名路由用法

    我有这样的路线 Open New Subscription page Route get account subscriptions create menu uses gt Subscriptions SubscriptionControl
  • CakePHP Xml 实用程序库触发 DOMDocument 警告

    我正在使用 CakePHP 在视图中生成 XMLXML核心库 http book cakephp org 2 0 en core utility libraries xml html xml Xml build data array ret
  • PHP - hash_pbkdf2 函数

    我正在尝试使用此 php 函数执行一个函数来哈希密码 http be php net manual en function hash pbkdf2 php http be php net manual en function hash pb
  • Android GCM 服务器的 API 密钥

    我有点困惑我应该为 GCM 服务器使用哪个 API 密钥 在文档中它说使用 android api 密钥 这对我不起作用并且总是给出未经授权的 http developer android com google gcm gs html ht
  • 未捕获的异常“Google_IO_Exception”,消息为“HTTP 错误:无法连接”

    我有一个任务 查询 运行一些从 gmail 邮箱检索数据的 php 代码 直到上周五 2015 年 4 月 10 日 它一直工作正常 现在我收到以下错误日志 E 11 58 26 094 2015 04 15 200 3 38 KB 14
  • 如何编写在正文中包含锚标记的 Zend Framework URL?

    使用 Zend Framework 中设置的标准 MVC 我希望能够显示始终具有锚点的页面 现在我只是在 phtml 文件中添加一个带有 anchor 的无意义参数
  • 使用 DOJO 自动完成文本框

    我正在寻找一种使用 DOJO 进行文本框自动建议的简单方法 我将查询的数据库表 使用 PHP 脚本 以 JSON 形式返回 有超过 100 000 条记录 因此这确实不应该采用 FilteringSelect 或 ComboBox 的形式
  • 将数组拆分为特定数量的块

    我知道array chunk 允许将数组拆分为多个块 但块的数量根据元素的数量而变化 我需要的是始终将数组拆分为特定数量的数组 例如 4 个数组 以下代码将数组分为 3 个块 两个块各有 2 个元素 1 个块有 1 个元素 我想要的是将数组
  • PHP cURL 在本地工作,在 AWS 服务器上出现错误 77

    最新更新 脚本作为管理员用户通过 SSH shell 作为 php script php 成功运行 当由 nginx 用户运行时 curl 命令无法执行 https 请求 所以我猜测这是nginx用户无法正确使用curl的问题 我已经检查了
  • 在 PHP 中模拟 jQuery.ajax 请求

    我必须在 PHP 中模拟 AJAX 请求 就像在 jQuery 中一样 我当前的代码在这里 原始 AJAX 调用 不得修改 ajax type POST url someFile php data data success function

随机推荐