Child Theme Support
Child theme support has landed in the Carrington core framework. We’d love to get some additional real-world testing on this before we tag the next core version.
You can grab the latest from SVN on Google Code. Then simply replace the carrington-core directory in your theme with new version you have checked out from:
http://carrington.googlecode.com/svn/framework/trunk
and that should do it.
Note that the way child theme support is implemented, your child theme can add new templates to your theme as well as overriding existing templates. I think this is necessary for Carrington – it allows you to create custom templates for your specific site and have them upgrade cleanly via the child theme.
Feedback welcome.
UPDATE:
The steps to test if you want to make a child theme for a Carrington theme (before this support is rolled out in new releases):
- Download the framework from SVN using the URL above and replace the carrington-core directory in your parent theme.
- Create your child theme (which can include new Carrington templates).
That’s it.
Categories: Announcements, Development
Thanks for this, Alex!
I have tried it by downloading the contents of the SVN and installed it into my blog, but I don’t see any change. I have tried to change slightly the style.css style sheet in the child theme, but nothing seems to change.
by Stéphane Gallay on Jan 10, 2010 at 2:47 am
Updated the post to include instructions.
by Alex King on Jan 10, 2010 at 8:40 am
Should the import link in the style.css of the child theme be
@import url("../carrington-blog/style.css");Or should we link to every style in /css?
by Stéphane Gallay on Jan 10, 2010 at 9:52 am
tessssssssssssssst
by malek on Jan 15, 2010 at 9:02 am
I too have tried the child theme but can’t get anything working… I used the same as above @import url(“../carrington-blog/style.css”); but it doesn’t seem to see my css at all. Anyone else successfully get this working yet?
by Phil on Jan 18, 2010 at 3:16 pm
I love the Carrington Blog Theme, using it on several sites, I just need to know, how I can make the font size bigger in the posts and pages, while I have figured out most of the files that are in the editor, the css editing file continues to be a mystery.
Thank you I would appreciate it.
by JR on Jan 27, 2010 at 12:45 pm
Hi-
I am trying to use the child theme and am trying to create a post template based on category. Am I wrong in the assumption that if I have a category ‘foobar’ I can create single/cat-foobar.php in my child theme and that be my single.php template for the category ‘foobar’?
Also I noticed that the child templates pull the wrong template_url for bloginfo so I put this in the child themes function.php and works like a charm.
$template_child = end(explode('/', dirname(__FILE__)));
function get_template_child($template_dir_uri)
{
global $template_child;
return $template_child;
}
add_action('template', 'get_template_child', 10, 1);
Thanks
by Kevin on Feb 1, 2010 at 10:27 pm
just a test
by haha on Feb 3, 2010 at 7:08 pm
kn
by test on Feb 12, 2010 at 8:27 pm
Bam! Just like that, it works. Thanks Kevin! Great work.
It took a couple of tries for me to get things right, so just to clarify Kevin’s comment..
You need to add a file called functions.php to the root folder of the child theme. The file does not need to have anything in it except …
Separate thought… Now that Carrington is going to support child themes, do you plan to make carrington-blog and carrington-text child themes? Perhaps carrington-jam would be the parent theme, or maybe a new parent called carrington-cms-framework?
by Joel Davis on Mar 3, 2010 at 5:19 pm
Sorry, I should have known that WP would ruin my post. What that should say is …
The file does not need to have anything in it except …
Begin PHP Tag
Kevin’s Code
End PHP Tag
In other words, you do not need to (and should not) duplicate anything from functions.php in the parent theme.
by Joel Davis on Mar 3, 2010 at 5:22 pm
Testing
by Connie on Mar 8, 2010 at 8:21 am
Hey i just tried the carrington mobile theme its awesome. One thing i wanna ask is where should i put my favicon.ico file? Thank u
by alteisenriese on Mar 10, 2010 at 6:03 pm
@alteisenriese: Place the favicon.ico file in the root folder of your site and the browsers will find it. If there’s any reason you want to keep your favicon file anywhere other than the root of the site, you can add a LINK tag to to the head of your document. It looks like this, (with a less-than symbol in front and a greater-than symbol at the end)…
link href=”/folder/where/you/keep/your/favicon.ico” type=”image/x-icon” rel=”shortcut icon”
by Joel Davis on Mar 10, 2010 at 11:56 pm
Bam! Just like that, it works. Thanks Kevin! Great work.
It took a couple of tries for me to get things right, so just to clarify Kevin’s comment..
You need to add a file called functions.php to the root folder of the child theme. The file does not need to have anything in it except …
Separate thought… Now that Carrington is going to support child themes, do you plan to make carrington-blog and carrington-text child themes? Perhaps carrington-jam would be the parent theme, or maybe a new parent called carrington-cms-framework?
by Bruce on May 21, 2010 at 6:45 pm
[...] Thematic Twenty Ten Default Theme Hybrid Carrington [...]
by Learn about Child Themes | Websites for Small Biz on Aug 8, 2010 at 5:51 pm