-
AuthorPosts
-
December 9th, 2015 at 13:10 #34367Pieter Keuzenkamp
Hi There !
I made a Nirvana child theme but it is not working properly.
I have made a folder nirvana-child and I’ve copied the style.css file and the index.php and frontpage.php (because this file has modifications made to it) files to the child folder.I also added a line “@import url(“../nirvana/style.css”);” to the style.css file which I made emtpy except for the top lines of the file. Here I left the Theme Name, Thehe URI etc. intact like I read in an article on making a child theme.
Can you tell me what more I need to do to make my child theme work properly?
Regards,
Pieter
December 13th, 2015 at 11:21 #34450ZedCryout Creations mastermindA child theme’s style.css file has a different structure than the parent theme (theme name is definitely different since you cannot have a child theme with the same name as the parent theme).
/* Theme Name: Nirvana Child Theme Description: Child theme created for *purpose* Author: Your name Template: nirvana Version: 0.1 */ @import url("../nirvana/style.css");
Other than this file, everything else is optional and you should only include files you are customizing.
If you like our creations, help us share by rating them on WordPress.org.
Please check the available documentation and search the forums before starting a topic.December 29th, 2015 at 20:21 #34975VC NickelsZed
I was tinkering around with a child theme for another of your themes and searched your forums for anything in particular that I might be missing. Child Themes are pretty simple basically but your themes do all sorts of nifty things so I wanted to see if I needed to add anything else.
In your comment above you use the @import method to get the parent style.css file, I’ve used enqueuing in a functions.php file in my child theme. I will be using some custom functions so I would have a functions.php file in my child theme anyway but there seem to be some debate about @import vs. enqueuing.
Amy particular reason you use @import?
Cheers,
VC Nickels
January 5th, 2016 at 23:03 #35049ZedCryout Creations mastermindIf you use a functions.php, use enqueue as that can be make loading styles a couple of nanoseconds faster for the browser.
My example was for the simplest child theme (with only a style.css file).
If you like our creations, help us share by rating them on WordPress.org.
Please check the available documentation and search the forums before starting a topic. -
AuthorPosts
The topic ‘How can I make a Nirvana Child Theme?’ is closed to new replies.