January 8, 2013 at 5:01 pm #19205
I am trying to modify the header.php and footer.php files using a child theme. None of the changes that I make in the child theme work. When I make those changes to the original files, they work. Do child themes not work in the Velvet theme? I would really like to get this child theme working so that all my changes aren’t lost with a theme update.
Any help would be appreciated.
Thanks in advance.
MarkJanuary 8, 2013 at 7:01 pm #102654
1) Make a folder called velvet-child and place it next to velvet theme folder.
2) Create a style.css file inside the velvet-child folder and add the following to it:
Theme Name: Velvet's Child
Description: Child of Velvet
Theme URI: some-url.com
Author URI: http://www.some-url.com
Make sure that capitalization and folder name matched import and template lines.so Velvet VelVet would be different.
3) Activate child theme as you would any theme in the backend
4) copy header.php and footer..php and drop them into the child theme folder.
If you want to test if they work. add
<?php echo "123zxy"; ?>
into the header and the footer , and then view source and and do a ctrl-f find for 123zxy.
NickJanuary 15, 2013 at 3:49 am #102655
Thanks Nick. My problem was that I failed to activate the child theme properly. I think I’ve fixed it. However, everything under the theme options have been reset. Is there anyway to import or transfer all my previous settings (to include portfolios, quick CSS, colors, etc.) to the new child theme?
Thanks again.January 15, 2013 at 8:49 pm #102656
No, the options for each theme are saved based on the theme. It would be best and easiest to just re-add in your custom settings.
DevinJanuary 16, 2013 at 6:34 pm #102657
okay, really embarrassingly dumb question, but just to be clear…where you have, in your example, some-url.com, is that that url for the domain, or the location of the theme, or what? And then for the Author URI, same question..the domain again, or what author’s url?January 17, 2013 at 8:24 am #102658
Please download http://www.mediafire.com/file/1sew8jza4twnaw7/velvet-child.zip
a zip of a child theme for Velvet. Just add it as you would any normal theme. If you are having a problem:
1) Is the name of the folder of the parent theme ‘velvet’? (capitalization important)
2) In the parent style.css , is the theme name Velvet?
The child style.css file just 3 lines are required (lines 2,5, and 11 of stle.css inside the zip file). All other lines are optional, so you can fill them out how you want. You can also just delete the optional lines.
The topic ‘Velvet Child Theme’ is closed to new replies.