Closed. This question is off-topic. It is not currently accepting answers.admin管理员组文章数量:1414621
Asking to recommend a product (plugin, theme, book, hosting provider), tool, library, or off-site resource is out of scope for this site, as it attracts opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 10 years ago.
Improve this questionIs there a plugin where you can upload image "logo" for use in the site's theme rather than the admin area?
Closed. This question is off-topic. It is not currently accepting answers.Asking to recommend a product (plugin, theme, book, hosting provider), tool, library, or off-site resource is out of scope for this site, as it attracts opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 10 years ago.
Improve this questionIs there a plugin where you can upload image "logo" for use in the site's theme rather than the admin area?
Share Improve this question edited Aug 26, 2010 at 12:57 John P Bloch 11.1k37 silver badges46 bronze badges asked Aug 26, 2010 at 5:28 idontknowhowidontknowhow 3152 gold badges4 silver badges20 bronze badges 2- 1 Please elaborate on your question. It is unclear exactly what you are looking for. Please give examples, and if appropriate, screen shots. – MikeSchinkel Commented Aug 26, 2010 at 7:11
- I don't understand as well, sorry. – hakre Commented Aug 26, 2010 at 9:26
4 Answers
Reset to default 1No, not really. This wouldn't be a plugin since every theme is different. Some themes have this functionality built in, though.
There is no plugin that I know of, but you could add this code to your functions.php file. It would accomplish what you're looking for:
// Add a custom logo to the admin pages. Image _MUST_ be 30x31, located in the theme images folder and named 'admin-logo.gif'.
function admin_logo() {
$logo = dirname(__FILE__).'/images/admin-logo.gif';
$logourl = get_bloginfo('template_directory').'/images/admin-logo.gif';
if (file_exists($logo)) {
echo '
<style type="text/css">
#header-logo { background-image: url('.$logourl.') !important; }
</style>
';
}
}
add_action('admin_head', 'admin_logo');
The function will check the images folder in your theme for a file named admin-logo.gif, and if found will add a CSS call to the page header to replace the stock WP logo. As mentioned in the comment, the image MUST be 30x31 pixels.
The logo is controlled by the theme ... so you'll have to use a theme that offers that option.
Alternatively, you could edit the them to change the logo.
+1 on using a theme that supports logos. Unless you are an experienced developer you really want to do as little editing of CSS and PHP as possible.
本文标签: Plugins for logo in wp themes
版权声明:本文标题:Plugins for logo in wp themes? 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745154334a2645076.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论