WordPress 模板条件判断函数

这个文章找了好久了,一直都想要,可是最终都没有发现……今晚(不对,是凌晨好几点了……)总算功夫不负有心人,急切想找一个判断函数,搜索引擎搜了好多,最终还是在一个关键词下找到了它!!!
原文来自:就是点这儿啦!

< ?php if(is_single()):?>

//这里写你想显示的内容,包括函数
< ?php endif;?>
下面是直接来自wordpress.org,我可以做一个简单的翻译

is_single()
When any single Post page is being displayed. 判断是否是具体文章的页面
is_single(’17′)
When Post 17 is being displayed as a single Post. 判断是否是具体文章(id=17)的页面
is_single(’Beef Stew’)
When the Post with Title “Beef Stew” is being displayed as a single Post. 判断是否是具体文章(标题判断)的页面
is_single(’beef-stew’)
When the Post with Post Slug “beef-stew” is being displayed as a single Post. 判断是否是具体文章(slug判断)的页面 阅读全文…

手动给WP添加表情

一直认为IPB那套小脸的表情比WP自带的 好看些……所以……
自己用TOTAL COMMANDER搜了一下PHP,发现是它:\wp-includes\functions.php

function smilies_init() {
	global $wpsmiliestrans, $wp_smiliessearch, $wp_smiliesreplace;

	// don't bother setting up smilies if they are disabled
	if ( !get_option('use_smilies') )
		return;

	if (!isset($wpsmiliestrans)) {
		$wpsmiliestrans = array(
		':angry:' => 'angry.gif',
		':biggrin:' => 'biggrin.gif',
		':blink:' => 'blink.gif',
		  ':blush:' => 'blush.gif',
		  ':closedeyes:' => 'closedeyes.gif',
		  ':cool:' => 'cool.gif',
		    ':dry:' => 'dry.gif',
		   ':excl:' => 'excl.gif',
		   ':glare:' => 'glare.gif',
		   ':happy:' => 'happy.gif',
		   ':huh:' => 'huh.gif',
		   ':laugh:' => 'laugh.gif',
		   ':mad:' => 'mad.gif',
		   ':mellow:' => 'mellow.gif',
		   ':ninja:' => 'ninja.gif',
		    ':ohmy:' => 'ohmy.gif',
		    ':ph34r:' => 'ph34r.gif',
		    ':rolleyes:' => 'rolleyes.gif',
		    ':sad:' => 'sad.gif',
		    ':sleep:' => 'sleep.gif',
		      ':smile:' => 'smile.gif',
		      ':tongue:' => 'tongue.gif',
		      ':unsure:' => 'unsure.gif',
		      ':wacko:)' => 'wacko.gif',
		      ':wink:' => 'wink.gif',
		      ':wub:' => 'wub.gif',
		);
	}

	$siteurl = get_option('siteurl');
	foreach ( (array) $wpsmiliestrans as $smiley => $img ) {
		$wp_smiliessearch[] = '/(\s|^)'.preg_quote($smiley, '/').'(\s|$)/';
		$smiley_masked = htmlspecialchars(trim($smiley), ENT_QUOTES);
		$wp_smiliesreplace[] = " $smiley_masked ";
	}
}

New Windows Live Beta starting now!

刚收到msftconn@microsoft.com的邮件,标题居然是New Windows Live Beta starting now!晕啊……不是早就开始了嘛……

Congratulations and welcome to the Windows Live Betas!

We are pleased to inform you that the Windows Live group has new software available for beta testing! Here's your opportunity to try out some exciting new software before its public release, and to help shape the future of Windows Live.

As part of this select group, you get an exclusive preview of Windows Live Home and the Windows Live Skydrive (previously called Windows Live Folders). Your role as a beta tester is important to us. Participating in the Windows Live beta program means you'll have the first chance to try out new features and products. And, by including you in the development process, we can make sure that these products not only function properly but also meet the needs of our customers.

To get started in the beta program, please follow these steps:

1.Visit http://connect.microsoft.com.
2.Click on My Participation on the left navigation menu.
3.Select Windows Live Beta in the list.
4.You're in!
5.Now you are ready to test the new Windows Live products.
阅读全文…

哭笑不得的汉译英

1.we two who and who? 咱俩谁跟谁阿
2.how are you ? how old are you? 怎么是你,怎么老是你?
4.you have seed I will give you some color to see see, brothers ! together up !你有种,我要给你点颜色瞧瞧,兄弟们,一起上!
5.hello everybody!if you have something to say,then say!if you have nothing to say,go home!! ] 有事起奏,无事退朝
6.you me you me 彼此彼此
7.You Give Me Stop!! 你给我站住!
8.know is know noknow is noknow 知之为知之,不知为不知…
9.WATCH SISTER 表妹
10.dragon born dragon,chicken born chicken,mouse’’son can make hole!! 龙生龙,凤生凤,老鼠的儿子会打洞!
11.American Chinese not enough 美中不足
12.one car come one car go ,two car pengpeng,people die 车祸现场描述
13.heart flower angry open 心花怒放
14.go past no mistake past 走过路过,不要错过
15.小明:I am sorry!
  老外:I am sorry too!
  小明:I am sorry three!
  老外:What are you sorry for?
  小明:I am sorry five!
16.If you want money,I have no; if you want life,I have one! 要钱没有,要命一条  
17.I call Li old big. toyear 25. 我叫李老大,今年25。
18.you have two down son。你有两下子。
阅读全文…

Hello world!

欢迎使用 WordPress。这是您的第一篇文章。您可以编辑它或是删除它,然后开始写您自己的 blog。