您的位置:首页»WordPress 教程, 主题开发, 进阶使用»  自动获取 WordPress 缩略图增强应用

自动获取 WordPress 缩略图增强应用

刚发布完自动获取 WordPress 缩略图这篇 WordPress 教程后,我发现原作者对其进行了增强,也许很多同学还没有来得及了解其原理,那么,我还是另开一篇博文讲解吧。
新代码可实现的功能

  1. Hyperlinks
  2. 图片链接到文章地址

  3. Thickbox
  4. 实现 Thickbox 图片缩放效果

  5. 图片分类

Code:
Download the post image code here
使用方法:

1
2
3
<?php the_image(size, class , link to post , link using thickbox, echo result); ?> 
//in the example video the single post page uses:
<?php the_image('medium','post-image',false,true); ?>

函数默认值:

  • Size — medium
  • Class — blank
  • link to post — false
  • link using thickbox — false
  • echo result — true

作者还制作了一段视频教程,大家可以看看:

5个评论

  • Reply 1 雪深

    January 15th, 2009 at 13:11

    safa

  • Reply 2 恋人

    January 18th, 2009 at 08:41

    不懂PHP,看后一头雾水。麻烦博主把使用的详细步骤讲一下:把代码写到那个文件?文件的什么地方?等等。谢谢了。期待你的回复。

    • Reply 3 辐射鱼

      January 19th, 2009 at 22:16

      步骤已经在“自动获取 WordPress 缩略图”这篇文章里说清楚了,很简单的,照做就是了

  • Reply 4 趣味博客

    January 18th, 2011 at 21:42

    博主的这个视频播放器很好看 能否分享一下