i have copied and modified the template file :


in my theme child and i kept the same path.

here is the full file

* Your Inspiration Themes
 * @package WordPress
* @subpackage Your Inspiration Themes
 * @author Your Inspiration Themes Team <[email protected]>
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE (GPL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-3.0.txt

 global $yit_is_header;
$yit_is_header = true;

 do_action( 'yit_before_logo' ) ?>

 <div class="group container">               

   <div class="row" id="logo-headersidebar-container">            

    <!-- START LOGO -->
    <div id="logo" class="group">
         * @see yit_logo
        do_action( 'yit_logo' ) ?> 
    <!-- END LOGO -->
    <?php do_action( 'yit_after_logo' ) ?> 


 <div id="nav">
    <div class="container">
          do_action( 'yit_main_navigation');



<div class="border borderstrong borderpadding container"></div>
<div class="border container"></div>
<div class="border container"></div>
<div class="border container"></div>

 <?php $yit_is_header = false; ?>

I have lost the CSS, why?

  • 1
    Please add the relevant code from your header.php file; otherwise there's no way to guess what the issue might be.
    – Pat J
    Jul 16, 2013 at 13:04

1 Answer 1


Without seeing the code, I would guess that your main stylesheet is being loaded by get_stylesheet_directory_uri() or something of that nature. Now that you've copied header.php into your child theme get_stylesheet_directory_uri() is looking in YOUR theme for that stylesheet. It isn't there and thus you have no CSS. Change the stylesheet directory to get_template_directory_uri() and it should come back.

Again, this is totally just a guess since you didn't post anything to go by. Please get in the habit of posting code as it will help us help you.

  • thanks it must be it but i dont find where in the code edited above where the css is called and where shall i modify the path for every templates to 'get_template_directory_uri()'
    – Matoeil
    Jul 16, 2013 at 14:01
  • No idea where your stylesheet is being loaded from then. Perhaps it is being enqueued via function? Impossible to say as I'm not familiar with that theme. Do you really need to override header.php? It looks like it has a lot of hooks for you to use so you don't have to. Jul 16, 2013 at 14:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.