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

How to integrate together a website currently hosted WordPress.com and a custom web application currently hosted on Azure?

To handle the single domain, you’ll want to obtain hosting that will run both your currently Azure-hosted site and WordPress. Usually Linux is the easiest way to go, though WP can run on IIS. You basically need to migrate the existing Azure-hosted site. Then, you can install WordPress in either a subdomain or a subfolder. … 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