Advertisements

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

Advertisements

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 )

Google+ photo

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

Twitter picture

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

Facebook photo

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

Connecting to %s

%d bloggers like this: