Skip to content

Instantly share code, notes, and snippets.

@rob-gordon
Last active June 8, 2017 00:48
Show Gist options
  • Select an option

  • Save rob-gordon/5d23be2baf3053ee15cb9538d82cf948 to your computer and use it in GitHub Desktop.

Select an option

Save rob-gordon/5d23be2baf3053ee15cb9538d82cf948 to your computer and use it in GitHub Desktop.
A javascript object representing the wordpress template hierarchy
var templateHierarchy = [
{
"index": [
{
"paged": [
{
"archive": [
{
"author": [
{
"author-$id": [
"author-$nicename"
]
}
]
},
{
"category": [
{
"category-$id": [
"category-$slug"
]
}
]
},
"archive-$posttype",
{
"taxonomy": [
{
"taxonomy-$taxonomy": [
"taxonomy-$taxonomy-$term"
]
}
]
},
"date",
{
"tag": [
{
"tag-$id": [
"tag-$slug"
]
}
]
}
]
}
]
},
{
"singular": [
{
"single": [
"attachment",
"single-$posttype",
"single-post"
]
},
{
"page": [
{
"page-$id": [
"page-$slug"
]
},
"$custom"
]
}
]
},
{
"home": [
"front-page"
]
},
"comments-popup",
"404",
"search"
]
}
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment