You will create a page template whose file name is custompage-template.php
here I suppose put in in your plugin dir/views/ folder. Whenever the page whose title is Your Page Name
is visited, the site will render your custom template
add_filter( \'page_template\', \'fw_reserve_page_template\' );
function fw_reserve_page_template( $page_template )
{
if ( is_page( \'Your Page Name\' ) ) {
$page_template = dirname( __FILE__ ) . \'/views/custompage-template.php\';
}
return $page_template;
}
Put it in your plugin file.