> For the complete documentation index, see [llms.txt](https://docs.cwicly.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cwicly.com/miscellaneous/actions.md).

# Actions

### FSE Templates

Perform an additional task when a specific template/template part is loaded on the frontend.

```php
add_action('cwicly/themer/templates', function ($theme, $slug) {
    // Do something here when a specific template or template part is loaded.
}, 10, 2);
```

The action accepts two arguments:

1. **`$theme`**: string that returns the theme slug associated with the template
2. **`$slug`**: string that returns the template slug
