I have a WordPress Multisite and I use the The Events Calendar plugin

I want to set the "Events page" as the default "Home page". For example:

subdomain.domain/site1/events/ as default Home page in subdomain.domain/site1/
subdomain.domain/site2/events/ as default Home page in subdomain.domain/site2/

Or, apply an automatic redirect? Using.htaccess? What is the code to redirect every site?

subdomain.domain/site1 redirect to subdomain.domain/site1/events

1 Answer 1


You should be able to use the code from this answer: https://wordpress.stackexchange.com/a/96068/10

$homepage = get_page_by_title( 'Events' );

if ( $homepage )
    update_option( 'page_on_front', $homepage->ID );
    update_option( 'show_on_front', 'page' );

Haven't tested it with multisite, but my guess is that it should work as advertised.

Not the answer you're looking for? Browse other questions tagged or ask your own question.