Skip to content

_template_paths

github-actions[bot] edited this page Jun 3, 2026 · 4 revisions

Allow ordered list of template paths to be amended.

Auto-generated Example

add_filter(
   '_template_paths',
    function( array<string> $file_paths ) {
        // Your code here.
        return $file_paths;
    }
);

Parameters

  • array<string> $file_paths Default is directory in child theme at index 1, parent theme at 10, and plugin at 100.

Files

apply_filters( $this->filter_prefix . '_template_paths', $file_paths )

← All Hooks

Clone this wiki locally