Archive

Posts Tagged ‘关键字’

wordpress某段时间内的文章数

2011-07-11 留下评论

function num_posts($days=1) {//$days就是设定时间一天;
global $wpdb;
$today = gmdate(‘Y-m-d H:i:s’, time() + 3600 * 8);//获取当前的时间
$daysago = date( “Y-m-d H:i:s”, strtotime($today) – ($days * 24 * 60 * 60) );  //Today – $days
$result = $wpdb->get_results(“SELECT ID FROM $wpdb->posts WHERE post_date BETWEEN ‘$daysago’ AND ‘$today’ AND post_status=’publish’ AND post_type=’post’ ORDER BY post_date DESC “);
foreach ($result as $Item) {
$post_ID[] = $Item->ID;//已发布的文章ID,写到一个数组里面去
}
$post_num = count($post_ID);//输出数组中元素个数,文章ID的数量,也就是发表的文章数量
$output .= ‘<a>’.$post_num.'</a>’;//输出文章数量
echo $output;
}

Advertisements

在google上搜索可以发外链的网站的关键字

2011-07-10 留下评论

DEDECMS: allintext:Powered by Copyright ? 2002-20XX DEDECMS

WiKi: allintext:Powered by HDWiKi V 4.0.4

BBSXP: allintext:Powered by BBSXP 7.00 Beta 2 ACCESS

Discuz: allintext:Powered by Discuz

blog:

allintext: Create an Account Account Details Profile Details Blog Details Yes, I’d like to create a new blog

allinurl: blog.php?user=

allintext: wordpress

分类:SEO 标签:, ,