WordPress – Gadgetizer Theme Released
来自http://designdisease.com的主题总是很精致,这次带来的是Gadgetizer Theme:

点击查看在线Demo。
下边是来自官方那个的介绍:
Gadgetizer is exactly what it sounds like it would be about. Gadgets. We wanted a simple theme that focused on the products themselves, so we have a big Flickr area in the footer section, as well as a mashup of images right below the featured post. As always, the front page has an easy to use “feature” section so you can easily put on display your most in-depth posts. You can even slot in a nice picture and a post excerpt to accompany the headline by editing the feature-image custom field and setting the category to “Featured”.
We kept it pretty similar in color scheme to the last design, with the colors white, blue, and green. Also we have included the psd files for the logo, robo girl, and for the gadgets snapshots.
The theme is fully widgetized. A special feature of this theme as we use in many of our themes is the logo changer. You can use the default WordPress setting (“blog name”) or you can use your own logo. Upload your logo in the root folder of Gadgetizer theme and name it logo.png or you can use the logo.psd as a template. You will find the source in the root folder of the Tipz theme.
This theme also has a large footer bar that includes a links section, Flickr photostream, and latest comments section. Because some people might not like this option, we also included in the theme options the ability to have this section not show up.
The theme is using a few plugins, with some already integrated into functions.php, so there is no need to install them. The only plugin you need to install manually is FlickrRSS. (FlickrRSS plugin is in the theme folder) (see the demo).
WordPress-AppCloud主题
推荐个主题,AppCloud:

是商城类型的模板,看起来改造成自己用的模板也还不错,有兴趣的可以看下,不过记得看下版权,版权啊版权。
Demo地址:http://demo.icreativelabs.com/ecommerce/
Download地址:http://portfolio.icreativelabs.com/wp-content/plugins/download-monitor/download.php?id=Download+Appcloud
WordPress-Tipz Theme Released
Learned from http://designdisease.com/blog/tipz-theme-released/?utm_source=rss&utm_medium=rss&utm_campaign=tipz-theme-released
designdisease.com又发布了一款Theme,这款主题颜色比较热情,挺好的,下边是Demo和下载地址。
The theme is fully widgetized. A special feature of this theme as we use in many of our themes is the logo changer. You can use the default WordPress setting (“blog name”) or you can use your own logo. Upload your logo in the root folder of Tipz theme and name it logo.png or you can use the logo.psd as a template. You will find the source in the root folder of the Tipz theme..
- View theme demo
- View theme demo (mirror)
- Download the theme (.zip package)
This work is licensed Creative Commons Attribution-Share Alike 3.0 License. This means you may use it, and make any changes you like. Just leave the credits on footer if you respect the designer’s work.
Enjoy !
LapOfLuxury Theme Released
designdisease每次出品的Theme都比较经典,这次是LapOfLuxury

Demo地址:http://www.lapofluxury.com/
WordPress – .htaccess的10个绝佳应用
内容转载自:< .htaccess在wordpress中的10个绝佳应用>:
.htaccess文件可以控制Apache Webserver,它非常实用我们可以通过它来实现很多功能。在这篇文章中我们可以看到通过修改.htaccess文件来增强wordpress的功能、安全性、可用性.
警告:在修改.htaccess文件时请确保已经备份以防不测
1.重定向Wordpress默认Rss地址到Feedburner
Feedburner是Google提供的Feed托管服务,非常优秀,如果不是受到国内“墙”的影响Feedsky也不会在国内一家独大。如果我们想手动修改wordpress文件来实现Feedburner替代默认Rss,过程非常繁琐,不过现在没有那么麻烦了,我们可以通过修改.htaccess来轻松实现该功能.
# temp redirect wordpress content feeds to feedburner
<ifmodule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} !FeedBurner [NC]
RewriteCond %{HTTP_USER_AGENT} !FeedValidator [NC]
RewriteRule ^feed/?([_0-9a-z-]+)?/?$ http://feeds2.feedburner.com/jomor [R=302,NC,L]
</ifmodule>
使用时别忘了把代码中的Feedburner地址替换为自己的
2.在wordpress的url中去除/category/
wordpress默认的category的永久链接形式是这样的:
http://yourblog.com/category/wordpress
这样看来,category似乎在url中显的多余,我们可以修改.htaccess来把他去除.
RewriteRule ^category/(.+)$ http://www.yourblog.com/$1 [R=301,L]
DFdou注:这里也可以使用一个叫Top Level Categories的插件可以解决这个问题,不过要搭配Permalink Redirect Plugin.
修改过后链接就会变成这个样子了:http://yourblog.com/wordpress.
WordPress-wp_mail()函数
有时候在自定义主题的时候,会用到发邮件的功能,这个时候可能就需要用到这个函数了。
wp_mail()函数是WP用来发邮件的一个函数,类似于PHP的mail(),函数定义如下:
function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() ){
// Compact the input, apply the filters, and extract them back out
extract( apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers', 'attachments' ) ) );
if ( !is_array($attachments) )
$attachments = explode( "\n", $attachments );
global $phpmailer;
// (Re)create it, if it's gone missing
if ( !is_object( $phpmailer ) || !is_a( $phpmailer, 'PHPMailer' ) ) {
require_once ABSPATH . WPINC . '/class-phpmailer.php';
require_once ABSPATH . WPINC . '/class-smtp.php';
$phpmailer = new PHPMailer();
}
// Headers
if ( empty( $headers ) ) {
$headers = array();
} else {
//...下边省略..............
//具体文件在WP根目录下wp-mail.php
$to是要发送的email地址,$subject是主题,$message是邮件内容,$headers比较复杂,可以这样设置
$headers = 'From: '. get_option('blogname') .' < ' . get_option('admin_email') . '>';
//尖括号前边有个空格,不要忘记了!
get_option('blogname')就是博客名了,get_option('admin_email')是admin的邮箱地址。还可以设置content-type,charset等参数。
当然了,需要使用wp_mail()函数,就需要成为WP的模板页(这个做法比较方便),或者手动导入全部需要的类文件(不推荐)。
参考资料:《Phpmailer的用法》。
WordPress-一些奇怪的错误Some Special Error
1.打开PHP页面,出现500错误。
用WP开发的时候碰到个奇怪的问题,3个wp-开头的文件夹下的全部PHP文件都无法访问,报500错误。
到底是个怎么回事呢,原来是因为文件的权限设置不当导致的,777的属性在某些系统下就会出现这个鬼问题!
建议解决方法,修改wp-开头的文件夹权限为755,里边的文件建议改成644属性。当然,uploads文件夹例外。
2.Warning: implode() [function.implode]: Invalid arguments passed in xxx(your url)/post.php on line 1762
在编辑page的时候会出现这个问题,但是post里却一切正常,恩,这个是升级2.8造成的问题,可能的原因有插件冲突,文件带了dom标志等等。
如果是插件冲突,请关闭插件。如果是文件带了dom标志,去DW里去掉。如果是升级2.8造成的,重新上传wp-include下边的文件,如果还不能解决问题,重新传全部文件吧……
WordPress-2次开发常用函数
全函数列表请参见这里:《WordPress模板标签Template_Tags》。
这里只列出最常用的几个。先是重要的bloginfo(),不直接echo数值的函数为get_bloginfo();恩,不少函数都是按照这个规则写的,PS:并不是全部!echo出函数值的函数为xxx()的话,那么不echo出结果值的的函数为get_xxx()。
该函数范围的是WordPress的配置参数,主要参数和值举例如下,常用的黑体标出:
admin_email = admin@example
atom_url = http://example/home/feed/atom
charset = UTF-8
comments_atom_url = http://example/home/comments/feed/atom
comments_rss2_url = http://example/home/comments/feed
description = Just another WordPress blog
home = http://example/home这个是网站首页地址
html_type = text/html
language = en-US
name = Testpilot网站名称
pingback_url = http://example/home/wp/xmlrpc.php
rdf_url = http://example/home/feed/rdf
rss2_url = http://example/home/feed
rss_url = http://example/home/feed/rss
siteurl = http://example/home也是网站地址
stylesheet_directory = http://example/home/wp/wp-content/themes/largo
stylesheet_url = http://example/home/wp/wp-content/themes/largo/style.css主题文件夹下的style.css地址
template_directory = http://example/home/wp/wp-content/themes/largo主题包地址
template_url = http://example/home/wp/wp-content/themes/largo
text_direction = ltr
url = http://example/home
version = 2.7
wpurl = http://example/home/wp
举例,bloginfo("wpurl ")会输出“http://example/home/wp”。
WordPress-Theme的制作
以下内容建立在有部分HTML基础下,如果有疑问可以Twitter我,EMAIL我,MSN我,留言我,电话我,etc,但是不要QQ我~
WP的主题所在文件夹为XXX\wp-content\themes\,里边每个包都是目录(如果正常的话)。
先来讲下主题的组成,可以先参考这个文章《WordPress -Template System模板系统》。
从该文章中我们可以发现,最最最简单的WP皮肤只需要一个文件,index.php,出于维护和多方合作开发以及修改的简便性来说,个人觉得一个主题至少应该分成以下几个部分:
header.php,里边放HTML的头部,一般是包含文档声明到body开始处,有时候也会包含菜单部分。
< !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>< ?php bloginfo('name'); ?> < ?php if ( is_single() ) { ?> Blog Archive < ?php } ?> < ?php wp_title(); ?></title>
..................
<body>

