get_template_part

Definition:
function get_template_part( $slug, $name = null ) {}

Load a template part into a template
Makes it easy for a theme to reuse sections of code in a easy to overload way for child themes.

Parameters

  • string $slug: The slug name for the generic template.
  • string $name: The name of the specialised template.

Defined actions

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

Source code

function get_template_part( $slug, $name = null ) {

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

1743

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: