gareth-gillman
8/27/2016 - 1:20 PM

WordPress Plugin Template Include

WordPress Plugin Template Include

add_filter('template_include', 'my_function_name', PHP_INT_MAX, 2 );
function my_function_name( $template ) {
 if(is_page('about')){
  $template = dirname( __FILE__ ) . '/templates/about.php';
 }
 return $template;
}