function createPage()
{
global $user_ID;
$page['post_type'] = 'page';
$page['post_content'] = 'hello this page created by plugin';
$page['post_parent'] = 0;
$page['post_author'] = $user_ID;
$page['post_status'] = 'publish';
$page['post_title'] = 'Dynamic page';
$pageid = wp_insert_post ($page);
}
now i am able to create new page by using above code. but i want to assign specific template to it… can anybody suggest it?