404 not working on main site on multisite

The cause of your problems is this line: define( ‘NOBLOGREDIRECT’, ‘http://www.ncc.my’ ); If a user visits a blog that doesn’t exist, e.g. http://example.ncc.my this is where the user is sent. However there are also sub directory installs, so all requests that aren’t found are sent there. The easy fix would be to set up a … Read more

WordPress multisite, allow non super admins to create sites

In multisite installation there already is a default admin and super-admin role, and if standard capabilities are different than what you want you can modify them: A default set of capabilities is pre-assigned to each role, but other capabilites can be assigned or removed using the add_cap() and remove_cap() functions. New roles can be introduced … Read more

Different site different div content – Multisite

Do the sites have different wordpress installs? If so, they probably have different names and you could use <div class=”different-content”> if (get_bloginfo(‘name’) == “site-1”) { // show stuff for blog named “site-1” } elseif (get_bloginfo(‘name’) == “site-2”) { // show stuff for blog named “site-2” } else { //if it’s not any of the sites … Read more

Multisite Redirect for Home Page Only

You can detect if you’re on the front page of a given site with is_front_page(). You can use the init hook to do a wp_redirect() to any absolute URI you want. add_action( ‘init’, ‘wpse182623_redirect_home_page_only’ ); function wpse182623_redirect_home_page_only() { if( is_front_page() ) { wp_redirect( ‘http://example.com/some-other-page/’ ); exit; } } Put this into a plugin and activate … Read more

Creating a multilingual multisite

WordPress multisite can handle different top-level domains by default. Just set up a »Sub-Domain Install« multisite starting from your existent WordPress (example.no). Then, add a new site with an arbitrary subdoman (e.g. se.example.no). Right after you created the new site, got to the sites edit screen (edit site) and change the domain to what ever … Read more