WordPress.org

Ideas

Child pages utilize parent page template

  1. Luke
    Member

    12345

    If the child page doesn't have a template (within the theme). The child looks if the parent page has a template. If so, use that template otherwise traverse the template hierarchy further.

    Link to current Template Hierarchy: https://developer.wordpress.org/themes/basics/template-hierarchy/#single-page

    Current template hierarchy concerning single pages:
    - custom template file.
    - page-{slug}
    - page-{id}
    - page.php
    - singular.php
    - index.php

    Suggested template hierarchy:
    - custom template file.
    - page-{slug}
    - page-{id}
    - page-{parent-slug}
    - page-{parent-id}
    - page.php
    - singular.php
    - index.php

    Posted: 1 year ago #
  2. gratisspiele
    Member

    That would be really helpful with many websites. In sight, I would save time.

    Posted: 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

  • Rating

    12345
    1 Vote
  • Status

    This idea is under consideration