global $more;
$more = 1; //1=全文 0=摘要
$my_content = strip_tags(get_the_excerpt(), $post->post_content); //获得文章
$my_content = str_replace(array("rn", "r", "n", " ", "t", "o", "x0B","""),"",$my_content); //删除空格等 如果 不想删除请直接吧这行前面 加上//
$my_content = mb_strimwidth($my_content, 0, 500,"..." ); //摘要前500字节
if (mb_strlen($my_content,'utf-8') < 10){ echo "对不起没有摘要"; } //少于10字节提示语言
else echo $my_content;
?>
|