Andor Nagy
Member
Posted 8 months ago #
Hey, I just made my own framework and want to create some child themes.
My framework's folder's name is "framework"
The child theme's folder's name is "Andor"
And the content in the child theme's style.css is the following
/*
Theme Name: Andor
Description: Test theme
Template: framework
*/
@import url("../framework/style.css");
But no matter what I try to add into the style.css it isn't showing up. Only If I copy the index.php and change something there. But styles don't.
Any idea?
Regards, Andor Nagy
Is the name of your theme, "framework" ?
Andor Nagy
Member
Posted 8 months ago #
Yes. And when I activate the child theme, and look at the page source in chrome, the theme doesn't gets the style.css from the child-themes folder.
Can you post a link to your website, with the Child Theme activated?
Andor Nagy
Member
Posted 8 months ago #
Are you uploading the theme via FTP or through the WordPress theme installer? If via FTP, what folder did you place the child theme in? It should be wp-content->themes->Child theme. This places the child theme folder directly next to the parent theme folder.
Also you may need to include the Author information in the theme css header.
Andor Nagy
Member
Posted 8 months ago #
I have it installed on my PC localhost.
by wp-content->themes->Child theme. you mean
wp-content/themes/child-theme/my-child-theme
or
wp-content/themes/my-child-theme
The second one, wp-content/themes/your-child-theme. The child theme folder should be next to the parent theme folder.
Andor Nagy
Member
Posted 8 months ago #
It is, and it still isn't working.
Just tried to look at your site a couple of times and it is not loading. I just get the browser loading icon, connection message showing but nothing appears. There may be a problem with your server or setup which is causing the issue.
Andor Nagy
Member
Posted 8 months ago #
Theres no problem with it. I just stopped XAMPP
In the child theme are you keeping the style.css inside another folder? If it looks like this wp-content/themes/my-child-theme/styles-folder/style.css then this will cause your issue.
Andor Nagy
Member
Posted 8 months ago #
Test importing the parent styles directly in the child them markup. If you have a header file place it there, if not place it in the body of the HTML, forget about invalid markup this is just for testing.
The first one will display the url of the parent theme, the second the child theme. This will let us know what WordPress thinks is going on. Look at results in Chrome or firebug.
'<style>
@import url("<?php bloginfo('template_url'); ?>/style.css");
@import url("<?php bloginfo('stylesheet_url'); ?>");
</style>'
Andor Nagy
Member
Posted 8 months ago #
It works now, I imported the style.css in the header using
'<style>
@import url("<?php bloginfo('stylesheet_url'); ?>");
</style>'
Great. Did the paths WordPress display match what you expected?
Andor Nagy
Member
Posted 8 months ago #
Not really, Now the child theme's style.css is also imported into the main framework. But nvm
Thanks for your help =)
Sapphire
Member
Posted 3 months ago #
I'm having this problem, too. It was working before the theme author updated his theme, and then it suddenly stopped. The style.css file is where it always was in the parent theme, and I didn't change anything in the import call in my child theme style sheet. But it's just not importing it.
@Sapphire - as you can see, this is a very old thread. Please start your own thread and include a link to your site.