Created
September 12, 2018 19:01
-
-
Save humayunahmed8/fd3ba376f9271ba09e7a83fcfa3c9e45 to your computer and use it in GitHub Desktop.
WordPress Template Hierarchy (as of WordPress 4.9)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
WordPress Template Hierarchy (as of WordPress 4.9) | |
is_404() -------------------------------------------------------------------------------------------------> 404.php | |
is_search() ----------------------------------------------------------------------------------------------> search.php | |
is_front_page() ------------------------------------------------------------------------------------------> front-page.php | |
is_home() ------------------------------------------------------------------------------------------------> home.php | |
is_attachment() ---------> {mime-type}.php -----------------> attachment.php ---------\ | |
is_single() -------------> single-{post_type}-{slug}.php ---> single-{post_type}.php --> single.php -----\ | |
is_page() ---------------> page-{slug}.php -----------------> page-{id}.php -----------> page.php --------> singular.php | |
is_post_type_archive() --> archive-{post_type}.php ----------------------------------------------------\ | |
is_tax() ----------------> taxonomy-{tax}-{slug}.php -------> taxonomy-{tax}.php ------> taxonomy.php --\ | |
is_category() -----------> category-{slug}.php -------------> category-{id}.php -------> category.php ---\ | |
is_tag() ----------------> tag-{slug}.php ------------------> tag-{id}.php ------------> tag.php ---------> archive.php | |
is_author() -------------> author-{nicename}.php -----------> author-{id}.php ---------> author.php -----/ | |
is_date() ---------------> date.php --------------------------------------------------------------------/ | |
is_embed() --------------> embed-{post_type}-{format}.php --> embed-{post_type}.php ----------------------> embed.php | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment