Quantcast
Channel: 《简单的文章截断方法, 支持 Read more 加上 nofollow》的评论
Browsing latest articles
Browse All 20 View Live

作者:简单的文章截断方法, 支持 Read more 加上 nofollow | xperience

[...] 转载自:http://zww.me/archives/25181 // 返回顶部的 [...]

View Article



作者:Hello Beautiful

英文主题,默认自动截断,但对中文文章无效,添加手动截断也无效,是什么原因呢?

View Article

作者:zwwooooo

<a href="#comment-67776" rel="nofollow">@Hello Beautiful </a> 英文主题没有考虑中文,所以需要用支持双字节截断的函数,你可以试试本文所说方法修改主题。

View Article

作者:Hello Beautiful

<a href="#comment-67777" rel="nofollow">@zwwooooo </a> 已经试过了,还是无法截断。博主能不能帮我看看?

View Article

作者:zwwooooo

<a href="#comment-67778" rel="nofollow">@Hello Beautiful </a> 你是如何判断无法截断?那里好像正常啊,完全长短是不可能的,你的文章有英文字符,你的字体不是等宽的,所以不可能会一样,总是会有出入。

View Article


作者:Hello Beautiful

<a href="#comment-67781" rel="nofollow">@zwwooooo </a> archive.php修改后,归档页能自动截断,但对index.php修改后没有效果,我的首页设置的一个静态页面,把最新文章放在了边栏的“最新文章”小工具里,问题就是小工具里的最新文章不能自动截断,请问在哪里修改?

View Article

作者:zwwooooo

<a href="#comment-67782" rel="nofollow">@Hello Beautiful </a> 简单来说就是你不会修改。有些主题会写自定义函数来代替wp内置函数。

View Article

作者:Beautiful

<a href="#comment-67815" rel="nofollow">@zwwooooo </a> 哈哈。。是啊。不过还好被我找到了,现在解决了。谢谢。

View Article


作者:小蝴蝶

我是根据官方文档the excerpt给的代码改的,貌似也很好使,可以保留 php the_excerpt() 不用重新截断了~function new_excerpt_more($more) { global $post; return '[.....] <a href="'. get_permalink($post->ID) . '" title="继续阅读本文"...

View Article


作者:zwwooooo

<a href="#comment-76746" rel="nofollow">@小蝴蝶 </a> 这个知道,用的地方不同,如果是通用性就用你这个钩子方法,不过新版的不需要纠结了,支持utf8了。

View Article
Browsing latest articles
Browse All 20 View Live




Latest Images

Pangarap Quotes

Pangarap Quotes

Vimeo 10.7.0 by Vimeo.com, Inc.

Vimeo 10.7.0 by Vimeo.com, Inc.

HANGAD

HANGAD

MAKAKAALAM

MAKAKAALAM

Doodle Jump 3.11.30 by Lima Sky LLC

Doodle Jump 3.11.30 by Lima Sky LLC