2018-04-16 14:55:54 +00:00
|
|
|
# Templates
|
|
|
|
|
|
|
|
Notes for a future documentation
|
|
|
|
|
2018-09-04 17:09:19 +00:00
|
|
|
Tainacan uses the ordinary WordPress template hierarchy for its templates. It adds additional templates in the hierarchy
|
2018-04-16 14:55:54 +00:00
|
|
|
|
|
|
|
* `tainacan/single-items.php` - Used in the single template for any item of any collection
|
2018-09-04 17:09:19 +00:00
|
|
|
* `tainacan/arhive-items.php` - Used in the list of items of any collection (e.g. both archive-tnc_col_4_item.php and archive-tnc_col_5_item.php)
|
2018-08-16 15:09:33 +00:00
|
|
|
* `tainacan/archive-taxonomy.php` - Used as a template for all Tainacan Taxonomies (list items based on a term)
|
2018-09-04 17:09:19 +00:00
|
|
|
* `tainacan/archive-repository.php` - Used in the `/items/` URL, which is added by the Tainacan plugin, and lists all items of all collections
|
2018-04-16 14:55:54 +00:00
|
|
|
|
2018-08-16 15:09:33 +00:00
|
|
|
Since each collection is a new custom post type, these templates are usefull to create a template that will be used by all collections.
|
2018-04-16 14:55:54 +00:00
|
|
|
|
2018-09-04 17:09:19 +00:00
|
|
|
Nevertheless, you are still able to create more specific templates, using the standard WordPress hierarchy.
|
2018-04-16 14:55:54 +00:00
|
|
|
|
|
|
|
Examples:
|
|
|
|
|
|
|
|
A template for single items in the collection with id 4:
|
|
|
|
|
|
|
|
`single-tnc_col_4_item.php`
|
|
|
|
|
|
|
|
A template for a single specific item:
|
|
|
|
|
|
|
|
`single-tnc_col_4_item-item-name.php`
|
|
|
|
|
|
|
|
A template for the list of items of the collection with id 4
|
|
|
|
|
2018-08-16 15:09:33 +00:00
|
|
|
`archive-tnc_col_4_item.php`
|
|
|
|
|
|
|
|
A template for a specific taxonomy
|
|
|
|
|
|
|
|
`taxonomy-tnc_tax_123.php`
|
|
|
|
|
|
|
|
A teplate for a specific term
|
|
|
|
|
|
|
|
`taxonomy-tnc_tax_123-term-name.php`
|