Skip to content

Instantly share code, notes, and snippets.

@JulioPotier
Created November 9, 2015 22:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JulioPotier/63c589de8c81cea284e1 to your computer and use it in GitHub Desktop.
Save JulioPotier/63c589de8c81cea284e1 to your computer and use it in GitHub Desktop.
// MY_PLUGIN_FOLDER est une constante imaginaire correspondant au dossier de votre plugin qui contient ce template
add_filter( 'template_include', 'my_plugin_embed_template_include' );
function my_plugin_embed_template_include( $template ) {
if ( basename( $template ) == 'embed-template.php' ) {
return MY_PLUGIN_FOLDER . '/embed-template.php';
}
return $template;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment