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."
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(使用前将#替换为@)