Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Ok, I have my main theme setup, and now I created a child theme with the name interio_child.

From these instructions I understand that you only need to add the style.css file which makes the link to your main theme.

Also you can add additional files which override code from your main theme.

Right now I have activated my child theme. It only displays the code that is present in my child theme folder and no CSS at all. How is this possible?

I've looked at numerous tutorials and wordpress support topics, but I can't get this child theme linked to my main theme.

These are the contents from my child theme's style.css:

/*
Theme Name: Interio Child
Theme URI: http://tohidgolkar.com
Author: Tohid Golkar
Author URI: http://tohidgolkar.com
Description: Child theme for the Interio theme 
Template: interio
Version: 1.1
*/

@import url('../interio/style.css');
@import url('stylesheets/mystyle.css');

Does the child theme folder need to contain all files from the main theme? I believe not, it should link with the main theme, correct? Then why are there no files from the main theme displayed on the website?

share|improve this question

closed as too localized by hakre, Michael, s_ha_dum, toscho May 23 '13 at 15:26

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Here's useful tutorial for child themes child-themes. Regards. –  Devoted May 23 '13 at 13:28
    
What does not displayed mean in your question? As far as CSS files are concerned, you can find out by looking into the network tab inside the developer console of your browser. It shows you 404 errors and such. Also your webserver does. So what have you done so far to actually find out what could cause your issue? From your question so far I read that you're new to child themes, however that must not mean that child themes itself cause the problem here. It can be a simple CSS issue, better troubleshoot then wonder :) –  hakre May 23 '13 at 14:05
    
Ok hakre, My import worked right after I deleted my header.php, footer.php and functions.php from the child theme folder. From what I understand you can create new (incomplete) versions of these files, which only contains the changes you want to make to the theme. Is this correct? If so, why does my theme stop functioning when I upload these files? –  Forza May 23 '13 at 14:06
1  
The functions.php file in child themes usually have local references and links to other files within the template folder itself. If you copy the funtions.php file rather then adding content you will get errors. Unlike style.css, the functions.php of a child theme does not override its counterpart from the parent. Instead, it is loaded in addition to the parent’s functions.php. (Specifically, it is loaded right before the parent’s file.) Therefore you should only add aditional functions rather then copying the file itself. –  Fernando Silva May 23 '13 at 14:20
1  
Just saw your comment and the info you mention is documented in the Child Themes codex entry under Using functions.php –  Fernando Silva May 23 '13 at 14:23

1 Answer 1

From your css snippet it looks like you child theme's styles are located in the /stylesheets/mystyle.css file. Make sure that the file is actually being imported.

I'd suggest either placing your css within the style.css file rather than a second import. But if you require the second file then modify your @import to @import url('/stylesheets/mystyle.css');.

share|improve this answer
    
Import works now :) But only for one file. The other stylesheet I have imported exactly the same way, but this one does not work. The style inside it must overrule a style in the original template. But that doesn't happen... Do you have any idea why that is? –  Forza May 23 '13 at 14:19
    
Is the site publicly available? Can you share a URL? –  Stephen May 23 '13 at 14:23
    
Just for clarification, is mystyle.css in your child theme folder and supposed to be you child theme's CSS file? If so you should call it style.css and remove @import url('/stylesheets/mystyle.css'); as it will be used automatically. –  Fernando Silva May 23 '13 at 14:28
    
Still recovering from errors and long before finished, but i've uploaded the site right here –  Forza May 23 '13 at 14:29
1  
@Michael donno if you can stil post an answer now the question is closed, but your answer would be marked as accepted :) –  Forza May 23 '13 at 18:44

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