> ## Content Index
> Fetch the complete content index at: https://getpublii.com/dev/llms.txt
> Use this file to discover other available public pages before exploring further.

# How to create custom templates?

- URL: https://getpublii.com/dev/how-to-create-custom-templates/
- Published: 2017-08-05T09:08:34.493Z
- Updated: 2024-08-15T20:49:00.287Z
- Description: Publii offers possibility to create custom templates for posts, pages, tags, and authors. To create a custom post template, follow these steps: "postTemplates": { "TEMPLATE\_SLUG":…
- Author: Tomasz Dziuda
- Tags: Tutorials

Publii offers possibility to create custom templates for posts, pages, tags, and authors. To create a custom post template, follow these steps:

1.  Create a **post-TEMPLATE\_SLUG.hbs** file,
2.  In the theme's config.json file, please add the following entry:

```json

"postTemplates": {
   "TEMPLATE_SLUG": "Human readable template name"
}
```

**WARNING!** Please use lowercase slugs without any special and non-latin chars. Also, avoid using the **DEFAULT** slug as it is used exclusively for posts which are using the default post template from the **post.hbs** file.

If custom post templates are available, then a dropdown option will appear under the Advanced settings in the post editor.

## Custom page templates

To create a custom page template, follow these steps:

1.  Create a **page-TEMPLATE\_SLUG.hbs** file,
2.  Add the following entry to the theme's config.json file:

```json

"pageTemplates": {
   "TEMPLATE_SLUG": "Human readable template name"
}
```

If custom page templates are available then the dropdown option will be activated in the page editor.

## Custom author templates

To create a custom author template, follow these steps:

1.  Create a **author-TEMPLATE\_SLUG.hbs** file,
2.  Add the following entry to the theme's config.json file:

```json

"authorTemplates": {
   "TEMPLATE_SLUG": "Human readable template name"
}
```

If custom author templates are available then the dropdown option will be activated in the author add/edit form.

## Custom tag templates

To create a custom post template, follow these steps:

1.  Create a **tag-TEMPLATE\_SLUG.hbs** file,
2.  Add the following entry to the theme's config.json file:

```json

"tagTemplates": {
   "TEMPLATE_SLUG": "Human readable template name"
}
```

If custom tag templates are available a dropdown option will be activated in the tag add/edit form.
