WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Page Templates in Child Theme (8 posts)

  1. Ian Stewart
    Theme Wrangler
    Posted 6 years ago #

    Anyone have an idea of how to get WordPress to recognize page templates in a child theme? That is, a theme with TEMPLATE:parent-theme in it's style.css. Something with a structure like so:

    parent-theme
    -[all the usual suspects and files]

    child-theme
    -[only the following files in this directory]
    -new-page-template.php
    -style.css
    -functions.php

    The idea here being that I could have access to new-page-template.php when writing pages while using child-theme.

    Ideally, I'd like to have the option of enabling this functionality in either the parent-theme (looks for page-templates) or in the child-theme (forces use of page-template). I think this would really help the development of CMS themes for WordPress.

    Any ideas?

  2. Tim Norton
    Member
    Posted 5 years ago #

    iandstewart, do you mean when you write a page, you would have the ability to choose a theme that would apply only to that page? I saw your derivative theme on themeshaper, very interesting. I developed a theme called MotherTheme that has skins to easily change the blog overall look without rupturing the whole site, but a skin is a .css file and an image folder. Not a separate set of .php files.

  3. Ian Stewart
    Theme Wrangler
    Posted 5 years ago #

    Oops. This has been resolved in WordPress 2.7. It'll be awesome.

  4. Tim Norton
    Member
    Posted 5 years ago #

    Thanks, but I think you misspelled sooper ...

  5. Dgold
    Member
    Posted 5 years ago #

    So does this work in WP 2.7?

    Can you flat-out replace templates from the parent theme, by duplicating the same file-name in the child theme?

    In other words --- can I replace the parent theme's sidebar.php with my own sidebar.php, by putting a new sidebar.php in the child-theme folder?

    How about adding a new page template like iandstewart asked?

    In the parlance of our times: Do templates in the child theme override templates in the parent theme, or does the child theme always inherit templates from the parent?

  6. heydouggeorge
    Member
    Posted 5 years ago #

    This thread is "resolved" but I don't see the answer. Has this been resolved in WordPress 2.7?

  7. heydouggeorge
    Member
    Posted 5 years ago #

    I guess this functionality *has* been added to 2.7... clues here:
    http://trac.wordpress.org/ticket/7086

  8. bluebird2
    Member
    Posted 5 years ago #

    yes. it is added.

Topic Closed

This topic has been closed to new replies.

About this Topic