Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WordPress Theme "ERROR: The theme defines itself as its parent theme. Please check the Template header."

Tags:

php

wordpress

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 files code is given below:

<!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]" 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 style.css code is:

    /*
 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;
}
....
like image 376
yogihosting Avatar asked Dec 30 '17 14:12

yogihosting


1 Answers

I removed the Template: yogi7 from the top of my styles.css file of the theme. And this solved the problem.

This is how the styles.css look now.

/*
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;
}
......

Hope this helps others.

like image 89
yogihosting Avatar answered Oct 06 '22 08:10

yogihosting