WPDev.one
Core Function
View Source on Trac ↗

get_template_part()

get_template_part( mixed $slug, mixed $name = null, mixed $args = array() )

Loads a template part into a template.

Parameters 3 required

Name / Type Description
$slug
string

The slug name for the generic template.

Required
(string

| null) $name Optional. The name of the specialized template. Default null.

Required
array

$args Optional. Additional arguments passed to the template. Default empty array.

Required

Return Value

((void)
| false) Void on success, false if the template does not exist.

Function Information

Since Version
3.0.0
Source File
wp-includes/general-template.php
Advertisement