WordPress.org

Support

Support » Themes and Templates » Twenty Eleven » [Theme: Twenty Eleven] Read more link does not displayed when there is no excerpt

[Theme: Twenty Eleven] Read more link does not displayed when there is no excerpt

  • whoaloic

    @whoaloic

    Hello!
    I have posts dislayed in a page (I use Category Pages plugin).
    Some of them have an excerpt, other displayed only the 20 first words of the content (I change twentyeleven_excerpt_length function in the function.php file).

    function twentyeleven_excerpt_length( $length ) {
    	return 20;
    }

    My problem is that when I have a post which have less than 20 words and have no excerpt, the “Read more” link is not displayed.

    Please somebody have a solution to display the “Read more” link whatever the size of the post or whether the excerpt is filled or not.

    I’ve looked on that function in function.php file, but did not manage to solve my issue!

    function twentyeleven_custom_excerpt_more( $output ) {
    	if ( has_excerpt() && ! is_attachment() ) {
    		$output .= twentyeleven_continue_reading_link();
    	}
    	return $output;
    }
    
    Any help would be appreciated!
    add_filter( 'get_the_excerpt', 'twentyeleven_custom_excerpt_more' );

    http://wordpress.org/extend/themes/twentyeleven/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Theme: Twenty Eleven] Read more link does not displayed when there is no excerpt’ is closed to new replies.
Skip to toolbar