Filter Reference

wpdm_template_path

1 min read Updated Jan 26, 2026

Description


As well as keeping edited template file in your active theme folder, your can keep template files any custom location you want, you simply need to introduce the new template dir using this filter hook

Parameters


Two arguments are passed to this hook.

Usage


To add new template dir:

<?php add_filter('wpdm_template_path','wpdm_new_template_dir',10,2); ?>

Examples


<?php 
add_filter( 'wpdm_template_path', 'wpdm_new_template_dir', 10, 2 );
function wpdm_custom_email_lock_heading( $template_dirs, $template_file ) {
    $template_dirs[] = "/new/template/dir/path/";
    return $template_dirs;
} 
?>