Include www prefix in site URL

You should use the full URL of your site, as in https://www.example.com . If you don’t include the protocol (the “https://” part), then pages on your site (and links to other pages or media) won’t work properly.

Restricting page templates by blog_id in multisite network

I know it is a bit old question. But I hope some one can find it usefull. If for some reason you can’t use child-theme (like me) there is hook theme_page_templates Accordint to developer WP Page Templates. Example: function makewp_exclude_page_templates( $post_templates ) { if ( is_multisite() && !is_main_site() ) { unset( $post_templates[‘wp-templates/iframe_container.php’] ); //In my … Read more

301 Redirection After Comment

If you have a thank-you-page with same slug in all sites you can do: add_action(‘comment_post_redirect’, ‘redirect_to_thank_page’); function redirect_to_thank_page() { return get_bloginfo(‘url’).’/thank-you-page’; } get_bloginfo(‘url’) detects the subsite you’re currently in