这是将正确覆盖管理徽标的函数(插入到functions.php中):
/**
* customize the admin logo that appears in the header
* http://www.wpbeginner.com/wp-themes/adding-a-custom-dashboard-logo-in-wordpress-for- branding/
* @author Paul Bredenberg
*/
function htx_custom_logo() {
echo '
<style type="text/css">
#wp-admin-bar-wp-logo > .ab-item .ab-icon {
background-image: url(' . get_bloginfo('stylesheet_directory') . '/assets/images/dashboard-logo.png) !important;
background-position: 0 0;
}
#wpadminbar #wp-admin-bar-wp-logo.hover > .ab-item .ab-icon {
background-position: 0 0;
}
</style>
';
}
//hook into the administrative header output
add_action('admin_head', 'htx_custom_logo');
Run Code Online (Sandbox Code Playgroud)
哈!
| 归档时间: |
|
| 查看次数: |
8836 次 |
| 最近记录: |