Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
WP User Manager - Register a directory for templates in plugins or other code
* @param array $file_paths
* @return array
function my_wpum_register_template_location( $file_paths ) {
$path = trailingslashit( dirname( __FILE__ ) . 'templates' );
// Add template path first as a higher priority to the core plugin and theme
array_unshift( $file_paths, $path );
return $file_paths;
add_filter( 'wpum_template_paths', 'my_wpum_register_template_location' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment