Templates
Loading templates via get_template_part
get_template_partinclude( 'customloop.php' );get_template_part( 'custom', 'loop' );get_template_part( 'loop', get_post_type() );// if the theme has a custom template for my plugin
if ( locate_template( 'mycustomplugin.php') != '' ) {
// load the custom template for my plugin from the theme
get_template_part( 'mycustomplugin.php' );
} else {
// fallback to the plugins default theme
include( 'defaulttemplates/mycustomplugin.php' );
}How Templates are Chosen, and The Template Hierarchy
Functions.php and Plugins
Loading Stylesheets
Templates and Plugins
Forms
Virtual Pages
Further Reading
Last updated