Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
// 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