Actions
FSE Templates
Perform an additional task when a specific template/template part is loaded on the frontend.
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:
$theme: string that returns the theme slug associated with the template$slug: string that returns the template slug
Last updated
Was this helpful?