网上流传有好多种方法,插件就无谓了
1,CSS的可以考虑
2,改主题输出更好(考虑WP Super Cache生成静态)
系呢度 http://zmingcx.com/wordpress-theme-non-plug-ins-to-achieve-the-chinese-cut-off.html 揾到吾错的方法
先揾到 the_content 或者 the_excerpt 再改成 <?php echo mb_strimwidth(strip_tags(apply_filters('the_content', $post->post_content)), 0, 200,"..."); ?>
不过,如果本来就有摘要的文章就吾得了,自己小改佐下
1 2 3 4 5 6 7 8 9 10 |
<?php if ( empty($post->post_excerpt) ) { echo mb_strimwidth(strip_tags(apply_filters('the_excerpt', $post->post_content)), 0, 400," ... ..."); } else { the_excerpt(); } ?> |
先判断摘要系吾系空的,空就输出400个字内的摘要