WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My website (at http://japanaddicts.org) breaks down in a rudimentary pro-HTML form when I try to activate the child theme.

My parent theme is Codilight. Just explain to me why is this happening. I am not looking for Codilight-specific premium support, but a reason that any knowledgeable person will know.

I have prepared my child theme with nothing but this:

    Theme Name:   Codilight Child
    Theme URI:    
    Description:  A modified and more specific version of Codilight.
    Author:       Prince
    Author URI:   http://japanaddicts.org/
    Template:     codilight
    Version:      1.0.0
    Tags:         pink, lesser social buttons
    Text Domain:  
@import url("../codilight/style.css");

I've uploaded it to a new directory wp-content/themes/codilight-child. When I activate it and open my website, it opens in a broken format (not fully HTML neither fully Codilight style). I had to revert back to the original/parent Codilight.

I've read the guide at WordPress Codex and it doesn't help. Here's a screenshot of how my website looks under the child theme:

Screenshot of the website under the child theme

share|improve this question

closed as off-topic by gmazzap, toscho May 27 '14 at 15:05

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

Please provide details to which parent theme are you using, and add the complete header for your child style.css, that is everything from the top to just after the @import part – Pieter Goosen May 27 '14 at 13:04
@PieterGoosen Done – user51433 May 27 '14 at 13:11
Codilight is a paid-for 3rd party theme. You'll probably have a hard time getting support for it on WPSE - does your fee not include support with the developer? – TheDeadMedic May 27 '14 at 13:29

It looks like your import statement is trying to import the CSS directory of the parent theme, rather than the style.css file.

Take a quick look at the Codex article on Child Themes

You'll want to change your import statement to:

@import url("../codilight/style.css");
share|improve this answer
I found that the style.css file was in /codilight all right, and so I made the change and replaced the older file with the newer one. But still it's the same. Here's a screenshot of how does it still look: i1278.photobucket.com/albums/y515/abhimanyu0003/… – user51433 May 28 '14 at 6:19
Your site is currently displaying properly, with the Codilight Daughter theme properly importing the parent stylesheet d.pr/i/zgkw – TomHarrigan May 28 '14 at 14:07

If you examine your pages source code CAREFULLY, check the URL’s of your stylesheets and scripts. Click on them to see if you get 404 error pages on some of them or of it opens the file.

If you are getting error pages then these files are likely referencing your child theme directory now instead of your parent theme directory where the files actually reside.

The way around this is to copy the entire folder structure of the parent theme across into the child theme.

Alternatively you can replace all incorrect instances below in the actual parent theme with the correct functions listed below:

get_template_directory_uri(); or get_stylesheet_directory_uri();


get_stylesheet_directory_uri(); or get_template_directory_uri();

Problem with this is that unless the developer of the theme updates this on his side, every time you update the theme this will be overridden, which defeats the whole purpose of a child theme in the first place!

I wrote a brief article on this if you want to take a look. View article

share|improve this answer
Wait, there's too much and I'm new and so I'm terrified... – user51433 May 27 '14 at 13:14

Enable WP_debug by editing your wp-config.php in your WordPress root files

Look for:

define('WP_DEBUG', false);

Change to:

define('WP_DEBUG', true);

Post any error messages in your top post, this will help us identify where the issue could be.

share|improve this answer