代码方面来自知更鸟博客: https://zmingcx.com/redirect-wordpress-registration-page-custom-registration-page.html

具体代码如下: