Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Load Template From WordPress Plugin
<?php
function km_include_gym_dashboard_page_template( $template ) {
if ( is_page( 'gym-dashboard' ) ) {
return plugin_dir_path( __FILE__ ) . 'templates/content-gym-dashboard.php';
}
return $template;
}
add_filter( 'template_include', 'km_include_gym_dashboard_page_template', 99 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.