Load Template From WordPress Plugin
This file contains 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
<?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