0

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

closed as off-topic by cybmeta, Pat J, Mark Kaplun, TheDeadMedic, Mayeenul Islam Oct 29 '15 at 6:07

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

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.