How to install child theme
-
I have read up on this topic but still unsure what to do.
I have created a folder
wp-content/themes/twentyeleven-child
and a style.css file in that folder.
now they say upload just like any theme using a zip file.
What do I put in the zip file, style.css and the folder (ie the whole path)??
I am experimenting on my own pc for now. I am using version 3.2.1 but my real web server is using 3.1
Thanks
-
activate the theme from the admin interface by going to appearance -> themes.
you don’t have to upload it because it already seems to be in the right location.
You don’t HAVE to zip the file and upload it. In twentyeleven-child folder your css should have a template line in the information header.
/* Theme Name: Twenty Eleven Child Theme URI: http: //example.com/ Description: Child theme for the Twenty Eleven theme Author: Your name here Author URI: http: //example.com/about/ Template: twentyeleven Version: 0.1.0 */The template line is the name of your parent theme. As long as this is residing in wp-content/themes, you have your child theme. The upload like any other theme thing would be if youre planning to package the theme. You can FTP to your web server, or simply drag and drop on your pc. All the same.
thanks for your quick reply but it does not appear any where on the dashboard for me to activate. Here is the content of style.css with all required lines.
[CSS moderated as per the Forum Rules. Please just post a link to your site.]
I go to the theme’s page top right corner where you select a theme and there are only 2, twentyeleven and twentyten.
How do I find the style.css of twentyeleven-child so I can work on it??
That looks right.
How do I find the style.css of twentyeleven-child so I can work on it??
The code you posted above is your twentyeleven-child style.css file. You would use this file to add new styles or possibly override some of the twentyeleven styles.
Yes, I understand that. Can’t I use the editor on the dashboard to modify this css file like I can with the twentyeleven/syle.css?? Do I have to modify it outside of the wp-admin interface??
Problem is from the wp-admin interface I can’t see the twentyeleven-child theme and it’s style.css
How can I check that the child theme is activated because I have change something in the child style.css but the web pages are still the same.
thanks
Admin > Appearance > Themes, you should have two tabs,
[Manage Themes][Add Themes]How can I check that the child theme is activated because I have change something in the child style.css but the web pages are still the same.
On the manage themes you should have three themes in total, one active (at the top) and two selectable, twenty ten, twenty eleven and your child theme?
I go to the theme’s page top right corner where you select a theme and there are only 2, twentyeleven and twentyten.
I assume this is the editor dropdown you should have all themes, the active theme will be selected, to edit a non-active theme choose it and press select, after modification you would activate it.
After changing styles view the changes and Ctrl+F5 this will clear and refresh the cached stylesheet from temporary internet files.
HTH
David
I am somewhat new to this so I might not offer as good advice as some other people people here, but the way I was able to do it was to compress the child .css into a zip that I placed in the same folder (which for me is …/wordpress/wp-content/themes/) that the parent theme was in (NOT inside of the theme folder) and wordpress automatically unzipped it for me when I uploaded it.
One note: Maybe not necessary, but make sure your style.css is in a folder BEFORE you zip it up. Technically you can name it whatever you want, but I think its easier if you name it: [parent name] child.
Good luck.
OK, I go to manage themes’ page and twentyeleven is the active theme (right at the top) and twentyten below it, but no twentyeleven-child.
I go to the edit page (appearance/editor) top right corner where there is a dropdown and there are only 2 themes to choose from, child is not one of them.
I have also done what tgpoletti has suggested. I zip, upload, install and activated it but still can’t find this child theme anywhere.
Help !!
Thanks everyone !!
Ok I have tested your stylesheet code above and it works fine for me on a local copy, I can see the child theme and edit the style.css
It might be something to do with your test environment, you do only have the one local copy of WordPress, copy your style.css somewhere, change the template name inside to ‘Test Theme’, save the file.
Select then right mouse and “send to” > “Compressed (zip) folder” so you will now have a style.zip file, rename this to test.zip.
Upload this zip from Admin > Appearance >Themes [Add New] and see if it appears.
HTH
David
David, from Appearance>Themes there is no Add New. Are we using diff wp versions?
There are Manage Themes and Install Themes tabs.
From Install Themes I use upload instead but again can’t see the child theme. Here is what I did.
Change the css file
/* Theme Name: Test Theme Description: Child theme for the twentyeleven theme Author: XXX Template: twentyeleven */ @import url("../twentyeleven/style.css");zipped and renamed it to test.zip
I delete existing twentyeleven-child folder first cause upload wouldn’t work otherwise
Then Appearance>Themes>Install Themes>Upload.
It says upload is successful. I click activate and it takes me back to the Themes’ page.
Checked that Themes/twentyeleven-child folder was created with style.css inside.
I logout of dashboard. Login again but nothing.
I appreciate your help!
I’ve got it.
All I have done different this time was to close wordpress pages, ie close wordpress and wordpress/wp-admin.
Deleted everything and start again. I create the folder and the css manually then login to wp-admin and there it is !!! Little thing like this drives you nuts sometimes.
thanks for everyone’s help none the less
The topic ‘How to install child theme’ is closed to new replies.