The east wind doesn't come
The catkins don't fly in March

Pure code beautifies WordPress landing page It's simple

As we all know, the WordPress landing page is not very beautiful, and the blogger has endured for a long time, and finally decided to change it!

The code is very simple. First, put a preview:

If you feel good, you can do something by yourself!

Put the code directly without much nonsense, and copy the following code to the function.php of the theme file:

 //Modify the link address of the LOGO on the default login interface to the address of your own website function custom_loginlogo_url($url) { return' https://www.wenzika.com/ '; // Enter the URL you need to link to here } add_filter( 'login_headerurl', 'custom_loginlogo_url'); function custom_register_url($url) { return' https://www.wenzika.com/ '; // Enter the URL you need to link to here } add_filter( 'login_registerurl', 'custom_register_url'); //Go to the title text of LOGO function custom_headertitle ( $title ) { Return __ ('Text | Realize the little freshness of code '); } add_filter('login_headertitle','custom_headertitle'); //Add the background image of the login and registration interface, and modify the style of login and registration box and button style function custom_loginbg() { echo '<style type="text/css"> body{background: url('.get_bloginfo('template_directory').'/ img/login_bg.jpg) center center no-repeat;background-size: cover;} #login{position:fixed; right:5%;padding: 2% 0 0;} .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 a{font-size: 16px;} .login #nav, .login #backtoblog {text-shadow: none; float: right;margin: 0 31px 0 31px;padding: 16px 0px 0 0px;} </style>';} add_action('login_head', 'custom_loginbg'); //Customize the LOGO image of the login page function my_custom_login_logo() { echo '<style type="text/css"> .login h1 a { background-image:url('.get_bloginfo('template_directory').'/ img/logo.png) !important; height: 60px; width: 250px; background-size: 250px;} </style>';} add_action('login_head', 'my_custom_login_logo');

Note: Change the link and image address inside!

Like( seven ) Reward
Copyright notice: This article is authorized by the Knowledge Sharing Attribution 4.0 International License Agreement [BY-NC-SA]
Article name: Pure Code Beautifying WordPress Landing Page
Article link: https://www.wenzika.com/1367.html
The resources of this website are only for personal learning and exchange. Please delete them within 24 hours after downloading, and they are not allowed to be used for commercial purposes, otherwise the legal issues will be borne by yourself.

comment two

  • Nickname (required)
  • Email (required)
  • website
  1. #0

    I've taken a look at your beautiful girl picture. Hehehehe, please give me the link. Thank you

    Love fishing Five years ago (2019-06-02) Friends from China  Safari browser  iPhone iPhone OS 12_3_1 like Mac OS X) AppleWebKit reply
    •  Wonder Zhou

      @ Love fishing This... It should be possible to go directly...

      Wonder Zhou Five years ago (2019-06-03) Friends from China  Google Browser  Windows 10 reply

Reward the author of the article if you think it is useful

Thank you very much for your reward, we will continue to give more high-quality content, let's create a better online world together!

Scan Alipay and reward

Scan WeChat and reward