Last active
May 22, 2020 04:10
-
-
Save kellenmace/7f4c893576333d589c1b to your computer and use it in GitHub Desktop.
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