-1

I am new to wordpress multisite. whenever I create a new sub-site and visit that sub-site it show 'Welcome to %s. This is your first post. Edit or delete it, then start blogging!' My problem is I want to set a sample(Default)page for all the newly created sub-sit with custom text menu and theme instead of their default post. is there any plugin that can help.

So my question is how to set sample(Default) page for each sub-site? instead of setting those page manually.

Any way to get rid of this issue?

Thanks!

Suryakant
  • 172
  • 6

1 Answers1

1

By default, wordpress shows the latest posts page as front page when you create a new site

You can change that by going to Settings > Reading.

or you can use Refrence action:

function wporg_wpmu_new_blog_example( $blog_id, $user_id, $domain, $path, $site_id, $meta ) {
    global $switched;
    switch_to_blog($blog_id);
    update_option('page_on_front', 'sample page id');
    restore_current_blog();
}
add_action( 'wpmu_new_blog', 'wporg_wpmu_new_blog_example', 10, 6 );
Anil Dhull
  • 31
  • 3