自定义wp-登录.php通过函数.php
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了自定义wp-登录.php通过函数.php相关的知识,希望对你有一定的参考价值。
Simply paste the following snippet of code into your theme’s functions.php file and adjust the CSS on line 4 as needed.
/** ******** ******** ******** ******** ******** ******** ******** ******** * TITLE: Beautify the Log-in Page * DESCRIPTION: Make the Log-in Page PRetty * 1: Change out Logo * 2: Change out URL * 3: Change out Title * * http://codex.wordpress.org/Customizing_the_Login_Form */ function my_login_logo() { ?> <style type="text/css"> body.login div#login h1 a { background-image: url(/wp-content/uploads/2014/07/logo-80x80.png); background-size: 80x 80px; } </style> <?php } add_action( 'login_enqueue_scripts', 'my_login_logo' ); function my_login_logo_url() { return home_url(); } add_filter( 'login_headerurl', 'my_login_logo_url' ); function my_login_logo_url_title() { return 'GuitarPick'; } add_filter( 'login_headertitle', 'my_login_logo_url_title' ); function no_errors_please(){ return 'Please Try Again'; } add_filter( 'login_errors', 'no_errors_please' );
以上是关于自定义wp-登录.php通过函数.php的主要内容,如果未能解决你的问题,请参考以下文章
php 一个自定义的try..catch包装器代码片段,用于执行模型函数,使其成为一个单行函数调用
PHP Wordpress:通过functions.php自定义wp-login.php
text 如果用户未登录,则仅显示维护模式。将maintenance.php文件添加到wp-content文件夹以自定义维护页面。