Created
December 1, 2017 22:01
-
-
Save jeremyescott/06832a4621ff989d35b3a4bf83509fba to your computer and use it in GitHub Desktop.
Matador Locate Template Filter Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Override Matador Locate Template | |
* | |
* Overrides Matador's job-single-append-apply-now.php template with a same-named file in the theme's | |
* matador-overrides folder. | |
*/ | |
add_filter( 'matador_locate_template', 'matador_locate_template_override_job-single-append-apply-now', 10, 2 ); | |
function matador_locate_template_override_job-single-append-apply-now( $template, $name ) { | |
if ( 'job-single-append-apply-now' === $name ) { | |
return get_stylesheet_dir() . '/includes/matador-overrides/job-single-append-apply-now.php'; | |
} | |
return $template; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment