如何用自定义alterna替换管理标题中的默认WordPress-W-logo
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了如何用自定义alterna替换管理标题中的默认WordPress-W-logo相关的知识,希望对你有一定的参考价值。
First, create an image that fits the allocated space. As of WordPress 2.8, the logo is a 30 pixels wide and 31 pixels tall transparent GIF. When using a transparent GIF or 8-bit PNG, ensure that the image matte matches the header background color: hex value 464646.A logo named “custom_logo.gif†inside the template directory’s image subfolder can substitute the default WordPress logo with the following code inside the theme’s “functions.php†file.
Thanks to Smashing Magazine.
//hook the administrative header output add_action('admin_head', 'my_custom_logo'); function my_custom_logo() { echo ' <style type="text/css"> #header-logo { background-image: url('.get_bloginfo('template_directory').'/images/custom-logo.gif) !important; } </style> '; }
以上是关于如何用自定义alterna替换管理标题中的默认WordPress-W-logo的主要内容,如果未能解决你的问题,请参考以下文章
如何用自定义标题替换 DataGridView 的 HeaderCells?
选择文本时,如何用我自己的视图替换 UIMenuController?