template

returns the template name used for the current page.

@t(template)

Example

This tool can be used to easily apply different styles to different templates, within the same theme, while still using the same header file across these templates:

Header file (header.php):

<html>
    <head>
        <!-- The header content goes here ... -->
    </head>
    <body class="@t(template)">

Footer file (footer.php):

        <!-- Some footer content here ... -->
    </body>
</html>

The actual template file can now include these files and is still wrapped in a unique class, identifying the template:

@i(header.php)

    ...

@i(footer.php)
See also