This plugin allows you to child theme from within wp-admin.
Download
http://wordpress.org/extend/plugins/one-click-child-theme/
Description
In the current version of WordPress, you shouldn’t modify CSS of any downloaded themes because if you update the theme, your changes will be destroyed. What you should instead do is create a child theme and edit the CSS of the child theme. If done this way, updates to the parent theme will be inherited instead of destroy your changes.
The problem is that currently the only way to child theme something is edit files on the filesystem. This is non-intuitive for shared-hosting sites with one-click WordPress installs (it usually involves a “shell account” or learning how to use “FTP”).
This plugin attempts to get around that issue, by adding a button to the themes page to allow you to child theme the currently selected theme. (It’s not really one-click, though.)
To use
- Install the plugin.
- Log in to your /wp-admin
- Click on “Appearance” on the menu
- Click on “Child Theme” (sub-menu or on the page).
- Give your new theme a name and description and click “Create Child”
- Your child should be created, edit the new theme style.css, and go wild!
Issues
- Doesn’t play perfectly with grandchildren themes (Not my problem, this is an issue with the way templates and stylesheets are handled in WordPress. I have ideas though)
- Pages have terrible UX
- Doesn’t like multiple theme directories (I don’t know how these work, yet)
- No error handling if something goes wrong during the shell commands. (Shouldn’t happen if you can install themes in the first place)
- Needs an “Add File” button to the editor to allow you to edit any file
- “add file” should be able to include files from the parent
Thanks
Inspired by @janeforshort‘s and @designsimply‘s WordCamp SF 2011 talk on CSS theming as requested by @sfgirl.
Also thanks to Chris Robinson for the screenshot copying code (see comments).
I Screenshot the sheriff
Hey Terry, I already modified my CSS. What do I do now?
Well, you can wait for the theme to get updated and it to break your s—t, or you can do something about it now while you still (may) remember what changes you made.
- Go through the steps for installing and running the plugin above.
- Click on the Appearance > Editor in your admin dashboard menu (or network admin menu if multi-site).
- Select the parent theme in the drop down on the right, click “Select” and make sure you are editing the file “style.css” (select on the right).
- Copy the changes you made, if you managed to remember them.
- Select the child theme you created to the drop down in the left (you should be editing “style.css”).
- Paste your changes to the end of the file.
(I wish I could automate this process, but WP_Upgrader is undocumented, and I’d need it to figure out what parts of the style.css you trashed. So you’re just going to have to deal.)



Awesome idea, one thing you might consider adding is copying the parents screenshot into the child directory — did it with three quick lines:
$screenshot = $theme_root.'/'.$parent_theme.'/screenshot.png'; $child_screenshot = $theme_path.'/screenshot.png'; copy ($screenshot, $child_screenshot);Great Idea! I’ll put it in 1.2.
It would be even better to have an uploader to upload a screenshot image into the media library and use that since in most cases the child theme is being created in the first place to make the theme look different, so using the parent screenshot would be deceptive in many cases and bad ux (it was proposed to do this in core for child themes and is not happening for this reason: http://core.trac.wordpress.org/ticket/18599 ).
When I set-up a child theme in a BuddyPress compatible theme, the resulting child theme displays a message stating that I need to activate a BuddyPress compatible theme.
Has anyone run into this situation?
Thanks! Steve
I’m trying to delete themes created with the plugin but they won’t delete, on ftp won’t allow either. Not sure what I might be doing wrong?
Pingback: WordPress Child Themes – How To | TwoBeers Project
Hi Terry,
Thanks for providing this plugin. It works great for a novice like myself. I am writing to find out if you have further instructions to share about creating an “adding file” button to the editor.
Much thanks in advance,
Delton
Hi Terry, This plugin is a great idea! I came across potential solutions for some of your planned updates. Check out the “Theme File Duplicator” plugin wordpress.org/extend/plugins/theme-file-duplicator/. I also came across one that can add or update the screenshot but don’t remember its name. I found yours, and both of these, in the first few pages of plugin search results for theme options. Karen
Hate to bug you about this but I spent two hours trying to figure out what went wrong. I only know from the steps I took and the php error log that it is related to the child theme plugin/child theme.
I’m working locally using MAMP, all was well until I installed your plugin and created a new child theme in your admin panel called blue typography and saved it. Immediately after I was no longer able to see the site. localhost and anything after it (ie. localhost/home) gets the chrome error loading page as if it were offline.
Simply put: How do I get my site back? I can get rid of the plugin once I can get back on but I don’t know what files to modify or delete or whatever has to be done.
Here is my error code, by the way
[09-Dec-2011 15:29:29] PHP Warning: require_once(/Users/chad/Documents/Design Resources/_wordpress/wp-content/themes/blue-typography/admin/options-framework.php) [function.require-once]: failed to open stream: No such file or directory in /Users/chad/Documents/Design Resources/_wordpress/wp-content/themes/yin_and_yang/functions.php on line 23
Same issue here. Likely a hosting issue as I’ve chmod’d the files, but the problem persists and appears to be related to permissions.
Help! I’m just setting up a website through 123-reg, with a shared server hosting package. I’m not good at ftp so gave one click child theme a try to create a child theme of twentyeleven. When I set the child theme and then preview my website, all formatting has gone. It comes back again when I switch to original twentyeleven theme. Any ideas?
I’m in the same position as Adam- I’m not any good with CSS files, even though I’ve spent SO many hours/days modifying the style of my site.
When installing and activating the “One-Click Child Theme” plugin, everthing I’ve ever modified in the CSS files to make my site look as I want it to look, is being reset to default. It did NOT help changing back to the parent theme, that was also at default. So I deleted everything on my server via FTP and uploaded it again (made a backup before installing the plugin). The plugin is still there, but the parent theme (with the CSS changes) is the active theme and is now back to normal.
Is the only way to get a child theme to work with this plugin (or any other way), to install it with a fresh/unmodified theme? And/or remembering all the changes I’ve ever made in the style.css etc, copy that and paste in the child themes directory/CSS files? How about copying the whole style.css into the child themes directory?