<?php
$permalink = urlencode(get_permalink($post->ID));
$title = urlencode($post->post_title);
$title = str_replace('+','%20',$title);
?>
<li id="xianguo">
<a href="http://www.xianguo.com/service/submitdigg/?link=<?php echo $permalink; ?>&
title=<?php echo $title; ?>" target="_blank" rel="nofollow">分享到鲜果</a>
</li>
<li id="douban">
<a href="http://www.douban.com/recommend/?url=<?php echo $permalink; ?>&title=<?php echo $title; ?>&sel=&v=1" target="_blank" rel="nofollow">分享到豆瓣</a>
</li>
<li id="zuosa">
<a href="javascript:u=location.href;t=document.title;t=t.substr(0,76);c=%22%22+(window.getSelection?window.getSelection():document.getSelection?document.getSelection():document.selection.createRange().text);c=c.substr(0,180);location=%22http://zuosa.com/collect/Collect.aspx?t=%22+encodeURIComponent(t)+%22&u=%22+encodeURIComponent(u);void%200">分享到做啥</a>
</li>
<li id="xiaonei">
<a href="http://share.xiaonei.com/share/buttonshare.do?link=<?php the_permalink() ?>&title=<?php the_title(); ?>"target="_blank" rel="nofollow" >分享到人人网</a>
</li>
<li id="kaixin001">
<a href="http://www.kaixin001.com/repaste/share.php?url=<?php the_permalink() ?>&title=<?php the_title(); ?>" title="分享到开心网" target="_blank" rel="nofollow">分享到开心网</a>
</li>
<li id="sina"><a href="http://v.t.sina.com.cn/share/share.php?url=<?php the_permalink() ?>&title=<?php the_title(); ?>"target="_blank" rel="nofollow" " title="分享到新浪微博" target="_blank" rel="nofollow">分享到新浪微博</a></li>
/************************************************
* bookmark *
************************************************/
#share {
background:none repeat scroll 0 0 #FFF6EE;
-moz-border-radius:5px 5px 5px 5px;
-webkit-border-radius: 5px;
background:none repeat scroll 0 0 #FFF6EE;
border:1px solid #FFF6CC;
width:602px;
float:left;
}
#share li {
background:url("images/share.gif") no-repeat scroll 0 0 transparent;
float:left;
margin:6px 0 0 5px;
padding:4px 0 4px 20px;
list-style-type:none;
}
#share li#fanfou {
background-position:0 -44px;
}
#share li#facebook {
background-position:0 -22px;
}
#share li#friendfeed {
background-position:0 -66px;
}
#share li#douban {
background-position:0 -110px;
}
#share li#xiaonei {
background-position:0 -87px;
}
#share li#zuosa {
background-position:0 -130px;
}
#share li#myspace {
background-position:0 -153px;
}
#share li#kaixin001 {
background-position:0 -176px;
}
#share li#xianguo {
background-position:0 -199px;
}
#share li#sina {
background-position:0 -220px;
}
<p id="share">
<ul><?php include(TEMPLATEPATH."/bookmark.php");?></ul>
</p>
以上就是安达网络工作室关于《手工添加WordPress文章分享按钮(无插件)实现步骤》的一些看法。更多内容请查看本栏目更多内容!
COOKIE记载SESSION记载数据库记载缓存文件记载从技术难度上,第1、2种办法最简略,因而,下文将完成以COOKI...
根本模板文件 style.css : CSS(款式表)文件index.php : 主页模板archive.php : Archive/Category模板404.ph...
现在,WordPress CMS 主题越来越多,WordPress 作为 CMS 终究有那些共同的劣势,吸援用户去一直的延长扩大呢...
自己2012年12月20日左右接触wordpress,至今曾经两个月。由于以前丝毫没有网站治理经历及编程才能,因而...
找到wp-includes/formatting.php文件中复制代码代码如下:// This is not a tag, nor is the texturization ...
明天偶尔留意到WordPress的分类和标签隐没了,开端认为是数据库表损坏,于是经过PHPMyAdmin修复表,然而留意...