Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Child Themes and the Template Hierarchy

Caleb Burks
November 05, 2016

Child Themes and the Template Hierarchy

Caleb Burks

November 05, 2016
Tweet

More Decks by Caleb Burks

Other Decks in Programming

Transcript

  1. About Me » Caleb Burks » WC Ninja at Automattic

    » Loves Gummy Bears » Tweets at @WPprodigy
  2. Style.css /* Theme Name: My Theme Theme URI: http://awesometheme.com Author:

    Caleb Burks Author URI: http://author.com Description: Blah Blah License: GNU General Public License v3 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Text Domain: storefront */
  3. Main Templates: Page » front-page.php - static homepage » page.php

    - backup for front-page.php » singular.php - Fallback
  4. Custom Templates: Archives » category-$slug.php » category-$id.php » tag-$slug.php »

    tag-$id.php Applies to authors, taxonomies, and CPT's as well.
  5. style.css /* Theme Name: Twenty Fifteen Child Theme URI: http://example.com/twenty-fifteen-child/

    Description: Twenty Fifteen Child Theme Author: John Doe Author URI: http://example.com Template: twentyfifteen Version: 1.0.0 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html Tags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready Text Domain: twenty-fifteen-child */ Template is important.