我的Yo2升级补丁

今天算是有空,发下牢骚。

模板篇

很多Yo2er都不断抱怨:“怎么我的模板又变成默认模板了”、“我的模板XXXXX又不见了”、 “我崩溃了……”

变成默认模板的解决方法很简单,到外观–>私有模板里面点击使用自定义模板,就可以恢复先前使用的模板了(OneoO早就说了)。在使用了私有模板后,也可以在该位置点击编辑私有模板进行修改。

某某部分不见了之类的问题,可能是因为WP版本的问题,导致部分功能函数不能使用。又或者部分关联到插件的,由于插件升级的缘故不能使用。

Yo2后台加入了几款偶很稀饭的模板,真爽……不过还是自己做算了。

插件篇

Yo2的插件变少了,可能是部分不兼容的缘故,OneoO进行了清理。

SRG Clean Archives,这个插件还在,升级了,功能代码有变:

<!--srg_clean_archives-->

同时,也多了插件选项页。

yo2sns,OneoO得力之作,在开启后,会有yo2sns选项页面进行设置。

Simple Tags,这个tag插件代替了原来的JK插件, 似乎更好用,功能更强大。

Google Analytics for WordPress,配合Google一款分析统计插件,假如自命E文够好,可以启用试试。

Wordpress函数篇

本人一般很少用自定义侧栏,一般都是手动写函数完成侧栏的编辑,既然Yo2升级到2.3.2版了。所以,新功能,还是要拿来爽一下先。

wp_tag_cloud,从古至今都受关注的标签云。使用方法:

<?php wp_tag_cloud('smallest=8&largest=22'); ?>

 

smallest为最小字号,largest为最大字号,单位是pt,默认显示使用最多的45个标签,可以使用number=0显示所有标签。

<?php wp_tag_cloud('smallest=8&largest=22&number=0'); ?>

 

the_tags,单篇文章tag。使用方法:

<?php the_tags(); ?> 或者 <?php the_tags('before', 'separator', 'after'); ?>

例如: <?php the_tags('Tags:', ', ', '<br />'); ?>

该函数要放在文章页面的while (have_posts()) : the_post(); ?>里面。

get_links,友情链接,功能和以前的wp_get_links()一样。

完结

先想到这么多了,有什么问题等想到再补充。

相关日志

  1. modijune said at January 5, 2008 11:23 am
  2. f said at January 6, 2008 12:15 am
  3. 怀穆 said at January 7, 2008 2:01 am

    很好,很强大,能不能说一下最近留言的php代码.

    [Reply this comment]

  4. kevin said at January 7, 2008 7:40 pm

    假如你开启了“中文 WordPress 工具箱”插件,请在模板内输入:< ?php get_recent_comments_only(); ?>(注意<和?之间的空格去掉)
    也可以参考下面地址的说明:http://yanfeng.org/blog/wordpress/kit/
    假如没有开启,可以在function.php里面加入该插件的内的相应功能函数,记得声明出处哦。

    [Reply this comment]

  5. 龌龊 said at January 7, 2008 9:17 pm
  6. Kevin said at January 9, 2008 2:55 pm

    测试评论

    [Reply this comment]

  7. freeware said at January 13, 2008 10:12 am

    不错啊,学习中

    [Reply this comment]

  8. 怀穆 said at January 19, 2008 9:31 pm

    [Comment ID #266264 Will Be Quoted Here]
    解决了,谢谢kevin 热心

    [Reply this comment]

  9. ziping said at July 8, 2008 8:30 am

    学习了。

    [Reply this comment]

  10. ziping said at July 8, 2008 8:31 am

    学习了。很好。

    [Reply this comment]

  11. 林晨 said at November 17, 2008 4:54 pm

    我发现中文 WordPress 工具箱的功能要自己在页面模板编辑,在挂件中直接添加无效

    [Reply this comment]

Leave a Reply

*(Will not be publiced)

@2007-2008 wgmcn.com All Rights Reserved.
Power by WordPress. Sea Blue theme by Kevin.