热热闹闹地换完域名后就应该正正经经地写一下日志了。这篇文章其实是用来回答sherry的,在我站内单篇文章后会有一段提示把该日志分享到twitter和收藏到delicious的文字,那并需要通过插件实现的,相反只是一段简单代码,很方便实现。
![]()
添加的方法,编辑主题文件中的single.php,在适当位置添加如下代码:
<span class="twitter">P.S. 如果你喜欢本文,把它分享到<a href="http://twitter.com/home?status=我正在看《<?php the_title(); ?>》这篇文章,还不错。文章链接:<?php the_permalink() ?>" title="Click to send this page to Twitter!"> Twitter </a></span><span class="delicious">或者收藏到<a href="http://del.icio.us/post?url=<?php the_permalink() ?>"> Delicious </a>。</span>
就象上面的代码则可,至于提示的文字各位可以自行修改。如果你再想修改一下它们的样式,或者可以参照下我自己的样式代码(颜色代码):
.twitter a {font-weight:700;color:#33ccff;background-color:#fff;}
.delicious a {font-weight:700;color:#3274D0;background-color:#fff;}
个人觉得这段代码挺实用,谁叫现在twitter那么火呢。还有补充一句,如果大家是通过我旧有的订阅地址阅读此文的,麻烦你们把订阅地址更换一下到新的:http://feed.saywp.com,麻烦各位了。