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?
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');
.