A WordPress-centric search engine for devs and theme authors



get_template_part_{$slug} ›

Since3.0.0
Deprecatedn/a
do_action( "get_template_part_{$slug}", $slug, $name )
Parameters: (2)
  • (string) $slug The slug name for the generic template.
    Required: Yes
  • (string|null) $name The name of the specialized template.
    Required: Yes
Defined at:
Codex:

Fires before the specified template part file is loaded.

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





Source

do_action( "get_template_part_{$slug}", $slug, $name );