/** * Remove the register link from the wp-login.php script */ add_filter('option_users_can_register', function($value) { $script = basename(parse_url($_SERVER['SCRIPT_NAME'], PHP_URL_PATH)); if ($script == 'wp-login.php') { $value = false; } return $value; });
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter