Skip to content

Instantly share code, notes, and snippets.

@joemaller
Created February 18, 2020 19:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joemaller/9f30a81585c720a2592b5e7f3b091f6c to your computer and use it in GitHub Desktop.
Save joemaller/9f30a81585c720a2592b5e7f3b091f6c to your computer and use it in GitHub Desktop.
The template-sorting array from WordPress' wp-includes/template-loader.php
<?php
$tag_templates = array(
'is_embed' => 'get_embed_template',
'is_404' => 'get_404_template',
'is_search' => 'get_search_template',
'is_front_page' => 'get_front_page_template',
'is_home' => 'get_home_template',
'is_privacy_policy' => 'get_privacy_policy_template',
'is_post_type_archive' => 'get_post_type_archive_template',
'is_tax' => 'get_taxonomy_template',
'is_attachment' => 'get_attachment_template',
'is_single' => 'get_single_template',
'is_page' => 'get_page_template',
'is_singular' => 'get_singular_template',
'is_category' => 'get_category_template',
'is_tag' => 'get_tag_template',
'is_author' => 'get_author_template',
'is_date' => 'get_date_template',
'is_archive' => 'get_archive_template',
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment