Skip to content

Template

Mattias edited this page Sep 9, 2021 · 4 revisions

How it works

Iroh uses a different approach for templates. Template files besides header.php, footer.php and index.php are located in the templates directory. The single.php, archive.php and taxonomy.php is a wrapper holding basic HTML then routs to single/archive/taxonomy directory looking for a matching file by post type/taxonomy.

templates
│
├── archive
├── parts
│   ├── acf-blocks
│   ├── content
│   └── global
├── single
└── taxonomy

Example

If you have a post type with slug offices, The Template class will look for templates/single/offices.php

Clone this wiki locally