WordPress Child Themes
WordPress child themes are used in conjunction with existing WordPress parent code. The child theme is used by a designer to leverage existing the WordPress theme framework to create a unique theme of their own.
WordPress will first look at the code at the child theme level before defaulting to the parent code. There is a hierarchical approach that ultimately ends with the index.php page.
For instance if a designer were to create a page called “Contacts” with an ID of 02, WordPress would render the page as outlined below.
- The child theme’s page-contacts.php
- The parent’s page-contacts.php
- The child’s once again page-contacts-02
- The parent’s page-contacts-02
- The child’s page.php
- The parent’s page.php
- The child’s index.php
- And now finally the parent’s index.php
This is how WordPress looks through pages for what it is looking for. If it cannot find the page, it will go through each page until it reaches the default index.php page. The index.php is there to handle any errors. Without the index.php, WordPress would display missing PHP pages as errors.
































