Static-Templates comes in handy when you have a highly customized WordPress
site. Ordinarily each
Custom Page that needs a slightly different layout needs to be assigned a
Custom Template in the WordPress Admin. Using the Template Dropdown to do this when there are a large number of pages is quite cumbersome and error-prone.
Static-Templates does is it hooks into WordPress’s template_include filter. The filter matches the URL slug, like say
art-gallery against a
template located at your theme’s
static-templates/art-gallery.php file. If the template file is found it’s
path gets passed to WordPress’s template loader.
Another cool thing about this technique is that it also ends up saving a
Database query! While WordPress needs to access the database to pick
up the name of Custom Template,
Static-Templates does this merely
Konstantin built this for a custom project for a friend, but I think it is quite appealing as a general theme customization convention.
Nice work Konstantin. Make it official now, before someone else does!