Skip to content


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):

  1. Download the framework from SVN using the URL above and replace the carrington-core directory in your parent theme.
  2. Create your child theme (which can include new Carrington templates).

That’s it.

Posted in Announcements, Development.


16 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Stéphane Gallay says

    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.

  2. Stéphane Gallay says

    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?

    • malek says

      tessssssssssssssst

  3. Phil says

    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?

  4. JR says

    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.

  5. Kevin says

    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

  6. haha says

    just a test

  7. test says

    kn

  8. Joel Davis says

    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?

    • Joel Davis says

      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.

  9. Connie says

    Testing

  10. alteisenriese says

    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

    • Joel Davis says

      @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”

  11. Bruce says

    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?

Continuing the Discussion

  1. Learn about Child Themes | Websites for Small Biz linked to this post on August 8, 2010

    [...] Thematic Twenty Ten Default Theme Hybrid Carrington [...]



Some HTML is OK

or, reply to this post via trackback.