Using TimThumb with WordPress Post Thumbnails


The WordPress post thumbnails functionality has become a basic necessity of theme coding, but it does have its limitations. Mainly you are stuck with the image sizes you specify in the Settings – Media tab. You can also specify your own image sizes, but clients undoubtedly want to change their image sizes over time or within one website over and over and over and over…. So it makes sense to make use of the dynamic image resizing script TimThumb. I use the following technique to grab the designated featured image post thumbnail from a post and then automatically resize it upon display. Works perfectly!

继续阅读“Using TimThumb with WordPress Post Thumbnails”

Amazon Web Service 云端运算平台免费攻略(3)


本文目的

如果你需要一个能自己管理控制的Blog平台,基本上需要的是租用一台服务器加上安装Blog软件。本文要告诉你,如何运用Amazon的云端平台AWS提供的一年免费Free Tier,来安装使用属于你自己的WordpressBlog发布平台!

请注意

如果要进行本文攻略,请确定你已经能够用ssh连上一个AWS的linux micro instance。最好的方法是阅读前两篇供略:

如果全部照着先前的攻略作,本文使用的相关指令与步骤应可百分之百不用修改。若选择了约略不同的步骤,则读者需视自己的情况,对指令或步骤做些微的调整。

继续阅读“Amazon Web Service 云端运算平台免费攻略(3)”

WordPress后台升级免输入FTP帐号


新版的WordPress自带了插件自动升级的功能。每次安装的插件有了新版本,只要点一个链接,就自动完成下载、解压、禁用插件、升级、重新启用这一系列步骤。常方便。但有些空间选择升级时会提示需要主机的FTP用户名和密码。

这个blog安装在linux系统上,第一感觉可能是权限的问题,反正是内部的服务器,随便折腾,就都设置成777。结果还是不行,就仔细地跟进去查了一下,发现问题在一个叫做“get_filesystem_method”的函数上。找到这样一个解释:

(FTP) it only uses this when it detects that files it creates have the wrong owner name

一下得到了提醒,可能是因为跑PHP进程的用户名和WP文件夹的所有者不同。于是用chown命令更改了文件所有者,命令用法如下:

chown -R www *

就是把目录下所有文件和文件夹的所有者改成叫做www的用户。这样再去尝试WP的自动升级,一键升级就能顺利进行了。

用phpMyAdmin操作WordPress数据库


WordPress有丰富的插件、主题,成功广大博主建博客利器,WordPress博客是由MySQL提供支持的,在博客的写作过程中,有时不得不牵扯到一些对MySQL数据库的操作,虽然,插件和代码的修改也能帮我们解决问题,但是,这也是治标不治本的丰富,随意,合理的利用phpMyAdmin来进行数据的操作的十分有必要的。

继续阅读“用phpMyAdmin操作WordPress数据库”

A wonderful free wordpress themes site


I have been looking for WP templates on WordPress.org until I found this site:wprex.com, “which provides a number of finest quality and innovative WP themes”, in their words. But I suppose that, despite it does not have as many themes as WordPress.org has, it provides more elaborate and more Multifunction templates as they can. In addition, the more detailed Specification helps me to find my favor themes a lot. So I recommend this wordpres​s themes​ site. By the way, it is wholly free and Easy to download wordpress templates without login or any hassle.

Please visit : http://www.wprex.com and find your themes in your style.

wprex

解决Twitter tools 中文链接问题


使用Twitter tools 插件,可以将最新的Post发送到Twitter上,确实很方便。由于我的永久链接(permalink)格式为

/archives/%postname%.html

文章链接中含有文章标题,当标题为中文的时候不太美观,所以用cos_slug_translator这个插件将中文标题转换为英文。但是我用Twitter Tools的时候就出现了问题:发送到Twitter上的链接依然含有中文,访问的话就是404错误。

继续阅读“解决Twitter tools 中文链接问题”

去除WordPress header 的 link 标签 rel 属性


WordPress 在 2.8 版本之后,增加了几个新的 link 标签 rel 属性,例如:

<link rel="index" title="Sino Blog" href="http://www.sinoblog.org" />
<link rel="start" title="Hello World" href="http://www.sinoblog.org/2007/09/hello-world.html" />
<link rel="prev" title="QQ邮箱支持域名邮箱个性化邮件服务" href="http://www.sinoblog.org/2009/09/qq-domainmail.html" />

如果要去掉 WordPress 博客 header 部分的这些 rel 属性,可以通过修改主题支持函数(functions.php)来实现,规则是:

remove_action( $tag, $function_to_add, $priority, $accepted_args );

例如,要去掉下面的这些 link 标签:

<link rel="alternate" type="application/rss+xml" title="WP Engineer RSS Feed" href="http://www.aliyoga.com/yujia/feed/" />
<link rel="alternate" type="application/atom+xml" title="WP Engineer Atom Feed" href="http://www.aliyoga.com/yujia/feed/atom/" />
<link rel="pingback" href="http://www.aliyoga.com/yujia/xmlrpc.php" />
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://www.aliyoga.com/xmlrpc.php?rsd" />
<link rel="index" title="WP Engineer" href="http://www.aliyoga.com" />
<link rel="start" title="Use WordPress 2.7 Offline" href="http://www.aliyoga.com/shop/" />
<link rel="prev" title="Recents Drafts All Authors" href="http://www.aliyoga.com/bbs/" />

分别对应的 remove_action 代码是:

remove_action( 'wp_head', 'feed_links_extra', 3 ); // Display the links to the extra feeds such as category feeds
remove_action( 'wp_head', 'feed_links', 2 ); // Display the links to the general feeds: Post and Comment Feed
remove_action( 'wp_head', 'rsd_link' ); // Display the link to the Really Simple Discovery service endpoint, EditURI link
remove_action( 'wp_head', 'wlwmanifest_link' ); // Display the link to the Windows Live Writer manifest file.
remove_action( 'wp_head', 'index_rel_link' ); // index link
remove_action( 'wp_head', 'parent_post_rel_link', 10, 0 ); // prev link
remove_action( 'wp_head', 'start_post_rel_link', 10, 0 ); // start link
remove_action( 'wp_head', 'adjacent_posts_rel_link', 10, 0 ); // Display relational links for the posts adjacent to the current post.
remove_action( 'wp_head', 'wp_generator' ); // Display the XHTML generator that is generated on the wp_head hook, WP version

在一个老外的博客看到的,记录一下
本文来源于Sino Blog http://www.sinoblog.org , 原文地址: http://www.sinoblog.org/2009/09/cleanup-wordpress-header-link-rel.html