-
Notifications
You must be signed in to change notification settings - Fork 16
_get_template_part
github-actions[bot] edited this page Jun 3, 2026
·
4 revisions
Allow template choices to be filtered.
The resulting array should be in the order of most specific first, to least specific last. e.g. 0 => recipe-instructions.php, 1 => recipe.php
add_filter(
'_get_template_part',
function(
array $templates,
string $slug,
string $name
) {
// Your code here.
return $templates;
},
10,
3
);-
array$templatesNames of template files that should be looked for, for given slug and name. -
string$slugTemplate slug. -
string$nameTemplate variation name.
apply_filters( $this->filter_prefix . '_get_template_part', $templates, $slug, $name )Replace the list footer for upcoming events lists. Default value </ul></div>.
add_filter(
'mc_upcoming_events_footer',
function( string $header ) {
// Your code here.
return $header;
}
);-
string$headerExisting upcoming events footer HTML.
string List header HTML.
apply_filters( 'mc_upcoming_events_footer', $footer )