Registration Link not showing on Multisite
-
I found out that on Multisite Networks the Registration links do not show, independently what is allowed in the network. I looked up the templates and found the problem on line 57 of the default login.php template:
if ( get_option(‘users_can_register’) && !empty($lwa[‘registration’]) )
The users_can_register option does not work on a Multisite network. I suggest that you create a helper function that will include the following code:
if (
(
!is_multisite() && get_option(‘users_can_register’)
) ||
(
is_multisite() && in_array(get_site_option(‘registration’), [‘user’, ‘all’])
)
) {
// registrations allowed
if (!empty($lwa[‘registration’]) && $lwa[‘registration’] == 1) return true;
}
return false:
You must be logged in to reply to this topic.