How to create a page when a theme is activated?
There is a hook specifically for this purpose, called after_switch_theme. You can hook into it and create your personal page after theme activation. Have a look at this: add_action( ‘after_switch_theme’, ‘create_page_on_theme_activation’ ); function create_page_on_theme_activation(){ // Set the title, template, etc $new_page_title = __(‘About Us’,’text-domain’); // Page’s title $new_page_content=””; // Content goes here $new_page_template=”page-custom-page.php”; // The … Read more