wordpress后台登录界面改造方法,使用代码改造,非插件!
很简单在你的网站后台找到主题模板函数functions.php文件在里面添加如下代码即可。
//去登录界面的默认图片 function custom_loginlogo() { echo '<style type="text/css"> h1 a {background-image: url('.get_bloginfo('template_directory').'/images/logo.png) !important;background-size: 265px !important;width:265px !important; } </style>'; } add_action('login_head', 'custom_loginlogo'); // 修改默认登录界面的 LOGO 的链接地址为自己网站的地址 function custom_loginlogo_url($url) { return'https://dedewp.com/'; //在此输入你需要链接到的 URL 地址 } add_filter( 'login_headerurl', 'custom_loginlogo_url'); function custom_register_url($url) { return'https://dedewp.com/'; //在此输入你需要链接到的 URL 地址 } add_filter( 'login_registerurl', 'custom_register_url'); // 去 LOGO 的 title 文字 function custom_headertitle ( $title ) { return __( 'WordPress 一站式建站服务平台' ); } add_filter('login_headertitle','custom_headertitle'); // 添加登录注册界面的背景图片,修改登录,注册框的样式及按钮样式 function custom_loginbg() { echo '<style type="text/css">body{background: url('.get_bloginfo('template_directory').'/images/bg2.jpg) center center no-repeat;background-size: cover;}#login{position:absolute;bottom:10%;right:5%;}.login #nav{font-size:16px;}.wp-core-ui .button-group.button-large .button, .wp-core-ui .button.button-large {height: 35px;width: 100%;margin: 10px auto;line-height: 32px;padding: 0 12px 2px;}#backtoblog{display:none;}</style>'; } add_action('login_head', 'custom_loginbg');
代码都有注释,根据注释来选择自己要的就可以了。