Thread Starter
mdkhan
(@mdkhan)
Thank you very much I figure it out.
below is the solution for someone who dont know about these hooks.
There are hooks which you can call to insert pages.
1- after_switch_theme hook is called when you switch theme (available if your wp version > 3.3.0 ) hook reference
2- wp_insert_post is used to create pages/post (more documentation at wp_insert_post)
Below code will be in your theme functions.php
<?php
function myactivationfunction($oldname, $oldtheme=false) {
}
add_action("after_switch_theme", "myactivationfunction", 10 , 2);
Reference : here explained in more details regarding activation and deactivation of theme