如果帖子非常短,请删除阅读更多链接
答
简单得到摘录并发布单词/字符长度。 假设
if ($post_l > $excerpt_l)
{
//show read more
}
else
{
//shoe post without read more
}
PHP字数
function count_words($str)
{
$no = count(explode(" ",$str));
return $no;
}