自定义管理员登录标题徽标

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了自定义管理员登录标题徽标相关的知识,希望对你有一定的参考价值。

When a client wants to access the WordPress admin, the first thing they will notice is the login page with a WordPress logo. Wouldn’t it be better if this page had the logo of your client’s company or maybe yours? There are many simpler ways to do this using plugins that allow other customization options too. But I personally prefer setting this using the powerful WordPress functions.php file.
If you have a functions.php in your custom theme, open it and if not, create a file named funtions.php and place it inside the theme folder.
Add below lines in the functions.php file:
  1. // CUSTOM ADMIN LOGIN HEADER LOGO
  2.  
  3. function my_custom_login_logo()
  4. {
  5. echo '<style type="text/css"> h1 a { background-image:url('.get_bloginfo('template_directory').'/lib/admin/images/logo_admin.png) !important; } </style>';
  6. }
  7. add_action('login_head', 'my_custom_login_logo');

以上是关于自定义管理员登录标题徽标的主要内容,如果未能解决你的问题,请参考以下文章

php 自定义登录徽标管理徽标

自定义管理员登录徽标链接

自定义管理员登录徽标和Alt文本

php 自定义徽标WordPress登录

php 自定义徽标WordPress登录

PHP 自定义WordPress登录页面的徽标