Support » Themes and Templates » Child Themes will rule the world!! How do you template child themes again?

  • Anyone know if Child Themes have officially been upgraded in WP 2.7, and how to do it?

    I know about replacing the parent theme’s Stylesheet with a child theme style.css. That is old news. Apparently Ian suggested the new method in June,

    It was said to be a part of WP 2.7 as of August,

    It’s still not documented in the Codex today. Actually the Codex says it’s not happening, quote,

    (Note that specifying a parent Theme will inherit all of the template files from that Theme — meaning that any template files in the child Theme’s directory will be ignored.)

    I don’t want to inherit all templates from the parent theme. I want to override templates in the parent theme, with the templates-of-the-same-file-name in the child theme (example, override sidebar.php with my own sidebar.php or my-sidebar.php, and add my-new-page-template.php).

    Has anyone gotten it to work in WP 2.7? Anyone got documentation, or a tutorial?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The Codex is out of date. Templates in a child theme should override those in the parent theme. There are some links in this article. Ian Stewart also wrote about this in his theme frameworks article.

    I’m sure theme developers would be extremely grateful if you tried this out and updated the Codex.

    I’ve tried it, and it would seem that child theme template files do not yet override their parents’.

    Cognoblue 1.0 is a theme that so far lives up to its claim of WordPress 2.7 compatibility, but my minor edits to the right sidebar are not showing up, even though the theme editor displays the updated code.

    Has anyone else had success with template file overrides?

    Seems to work now in 2.8 except for one major problem.

    If you use the admin interface to edit a theme file (which granted seems a bit trying):

    • You can’t tell whether a file is from the child or parent theme
    • When you edit a file that’s only in the parent theme, it changes the parent theme file

    Seems to me the whole purpose of a child theme is to make the parent theme immutable, and for the child theme’s files to be used instead. That means that if you edit a file in the admin editor, and it loads a parent theme file, it should save in the child theme directory, creating a new (customized) child theme file if it doesn’t yet exist.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Child Themes will rule the world!! How do you template child themes again?’ is closed to new replies.