2009-10-17 14:58
wordpress添加logo的方法
分类: WP相关
作者: 晴空落叶
阅读: 33,838
19条评论
如题,有的主题附带有logo,只要修改下图片就行。有的主题没有logo的可以试试以下的方法添加站点Logo:
打开模板的header.php文件,将
< ?php bloginfo('name'); ?>
替换成:
<img src="<?php bloginfo('template_directory');?/>/images/logo.gif" alt="< ?php bloginfo('name');?>" title="< ?php bloginfo('name');?>" width="图片宽度" height="图片高度"/>
标签: logo , WordPress , WP相关 , 主题
转载注明: 转自左岸印象
本站遵循: 署名-非商业性使用-禁止演绎 3.0 共享协议
文章分享: Digg / Twitter / Facebook / GReader / 鲜果 / 豆瓣 / 人人网 / 开心网 / 新浪微博
我是把LOGO作为背景图的,呵呵,效果都一样
[回复]
晴空落叶 回复:
2009-10-17 于 16:07
我的博客在IE6下惨不忍睹
[回复]
[回复]
晴空落叶 回复:
2009-12-01 于 20:46
就是修改主题的header.php文件,替换相关的位置。效果替换了刷新慢慢看
[回复]
[回复]
[回复]
晴空落叶 回复:
2010-05-07 于 12:48
改错了吧
[回复]
没有发现效果的 你的加了吗
[回复]
晴空落叶 回复:
2010-09-27 于 09:53
我的Logo就是用这个方法加的
[回复]
我和的是主题巴士D4的主题:这个主题的下载地址是http://www.wpbus.com/?p=176
在这个主题中的header.php 有二处之多,晕,不知从何下手,这个主题的heaade.php如下:
<?php
/**
* header template
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU General Public License for more details.
*
* Required Version:
* PHP5 or higher
* WordPress 3.0 or higher
*
* If you find my work useful and you want to encourage the development of more free resources,
* you can do it by donating…
* paypal: yofox2008@163.com
* alipay: yofox2008@163.com
*
* @author wpbus team
* @link http://www.wpbus.com/
* @copyright Copyright (C) 2010 wpbus.com All rights reserved.
* @License: GNU General Public License v2.0
* @License URI:http://www.gnu.org/licenses/gpl-2.0.html
*/
/* It would be great if you’d leave the link back to my site in the footer */
?>
‘menu-header’, ‘menu_class’ =>’topmenu’, ‘depth’ =>’1′, ‘container_class’ => ”, ‘theme_location’ => ‘primary’ ) ); ?>
<a href="/” title=”">
<form action="” method=”get”>
<input type="text" class="txt" id="tops" name="s" size="36" value="” />
[回复]
晴空落叶 回复:
2011-01-26 于 22:05
我看了一下,你的主题有那个参数的,header.php里面。替换的时候< ?php问号前的空格要去掉
[回复]
代码有错误
<img src="/images/logo.gif”
directory后多一个/
还有不是
[回复]
学习了!如果能在写的清楚些就更好了
[回复]
<meta http-equiv="Content-Type" content="; charset=” />
|
<?php if ( $paged
<link rel="stylesheet" type="text/css" media="screen" href="” />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="” />
<script type="text/javascript" src="/debut.js”>
<link rel="pingback" href="” />
<a href="”>
<li><a href="”>Home
这是我的header.php前面部分,能告诉下改何处么?
[回复]
<meta http-equiv="Content-Type" content="; charset=” />
|
<?php if ( $paged
<link rel="stylesheet" type="text/css" media="screen" href="” />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="” />
<script type="text/javascript" src="/debut.js”>
<link rel="pingback" href="” />
<a href="”>
<li><a href="”>Home
复制掉了一大截
[回复]
啊。。。为什么代码总是自己少一大截啊! !
[回复]
晴空落叶 回复:
2011-06-13 于 21:37
能把文件发给我看看吧
[回复]
你好 可以帮我看看如何修改吗?、
<a href="”>
<!–<a href="”><img src="/images/logo.gif” alt=”" />–>
以上是我这个主题header.php的代码,
[回复]
<a href="”>
<!–<a href="”><img src="/images/logo.gif” alt=”" />–>
怎么没显示完整。。。
[回复]