• Resolved DPGrant

    (@dpgrant)


    I’m not sure why you chose to limit excerpts by chars instead of words, but using chars has the unfortunate side effect of sometimes breaking tooltip text in the middle of a word. What would you think about substituting

    $char_limit = absint( $this->settings[ 'excerpt_limit' ] );
    if ( strlen( $excerpt ) >= $char_limit ) {
       $excerpt = substr($excerpt, 0, strrpos(substr($excerpt, 0, $char_limit), ' '));

    for

    if ( strlen( $excerpt ) >= absint( $this->settings[ 'excerpt_limit' ] ) ) {

    in get_the_excerpt()?

    https://www.ads-software.com/plugins/glossary-by-codeat/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Another suggestion – Excerpt limit’ is closed to new replies.