开发者

Wordpress read more error and length

Ok so I literally can't find anything that references this issue. I've tracked down why it's happeneing but can't find a solution. So what's happening is when an author makes a post and the tag is used at a point that isnt 40 words in the author page doesnt include the read more link. So basically if the more tag isnt placed atleast 40 words in, the link doesnt show up and assumes the post is only that 开发者_如何学Pythonmay words long.

here's a link to the issue... http://www.dudnyk.com/blog/author/frank-powers

if you look at the 2nd post down you can see there is no "Continue Reading" but if you look for that post on the main blog page, you'll see there is a link for it. If I moved the read more further down in the post it would work. any ideas??

the loop is initiated here... get_template_part( 'loop', 'author' ); but i'm not sure how to find where that function is doing what where.


You are using (a child theme of) the wordpress theme 'TwentyTen', which ships with wordpress since 3.0 was released.

There are two functions in your functions.php that together cause the effect your witnessing.

function twentyten_excerpt_length( $length ) {
    return 40;
}
add_filter( 'excerpt_length', 'twentyten_excerpt_length' );

sets the excerpt length to 40 words. And something along the lines of this:

function twentyten_auto_excerpt_more( $more ) {
    return ' …';
}
add_filter( 'excerpt_more', 'twentyten_auto_excerpt_more' );

There should be a third function, twentyten_continue_reading_link(), which should be called by twentyten_auto_excerpt_more( $more ) in the second line like so:

return ' …' . twentyten_continue_reading_link();

But somehow it doesn't work. Either because the auto excerpt function does not call the continue reading link, or because the continue reading link does not exist.

Anyway, if you do not use excerpts anywhere else on your site, just set the excerpt length to a lower value than 40 in the first function I posted - or, if your using excerpts, modify the second such that it returns a 'Continue reading...' link.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜