do_action( "get_template_part_{$slug}", string $slug, string|null $name, array $args )

Fires before the specified template part file is loaded.


Description

The dynamic portion of the hook name, $slug, refers to the slug name for the generic template part.


Parameters

$slug

The slug name for the generic template.

$name

The name of the specialized template.

$args

Additional arguments passed to the template.


Source

File: wp-includes/general-template.php

View on GitHub



Changelog

Changelog
Version Description
5.5.0 The $args parameter was added.
3.0.0 Introduced.