[Plugin: Easy Excerpt] Problems with auto-generated excerpts
-
Easy Excerpt plugin has are problems with auto-generated excerpts on following causes:
1. has_excerpt() always false with auto-generated excerpts.
2. ‘excerpt_more’ filter don’t work when auto-generated excerpt length is obtained less than the specified in ‘Excerpt Length’ option, (and the ‘excerpt_more_link’ is missing at output).
This can happen when, for example, post contains a ‘Read more’ insert and text before this insert are fewer than ‘Excerpt Length’.Solution I propose (and use):
in the easy-excerpt.php replace the lines
113-124
function custom_auto_excerpt_more_link($more) { $link = get_option( 'easy_excerpt_more_link' ); return $more. ' <a href="'. get_permalink() . '" rel="nofollow">' . $link . '</a>'; } function custom_manual_excerpt_more_link($more) { $link = get_option( 'easy_excerpt_more_link' ); if( has_excerpt() ) { $excerpt_more_link = ' <a href="'. get_permalink() . '" rel="nofollow">' . $link . '</a>'; } return $more. $excerpt_more_link; }
with
function custom_excerpt_more_link($more) { $link = get_option( 'easy_excerpt_more_link' ); return $more. ' <a href="'. get_permalink() . '" rel="nofollow">' . $link . '</a>'; }
and 30-31
add_filter('excerpt_more', array( $this, 'custom_auto_excerpt_more_link' ) ); add_filter('get_the_excerpt', array( $this, 'custom_manual_excerpt_more_link' ) );
with
$excerpt_more_link_filter = ( has_excerpt() ) ? 'excerpt_more' : 'get_the_excerpt'; add_filter($excerpt_more_link_filter, array( $this, 'custom_excerpt_more_link' ) );
Please advise if you find problems when using that solution.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘[Plugin: Easy Excerpt] Problems with auto-generated excerpts’ is closed to new replies.