• In using this plugin I’ve found that the last word is truncated if the content is shorter than the number of words passed as an argument. The array_pop call near line 54 of the plugin file should only be called if the content has been truncated (i.e. is longer than the allowed number of words). The condition below seems to fix the problem.

    if ( sizeof($content) == $limit ) {
    array_pop($content);
    }

    This is probably somewhat of an edge case since most posts will be longer than your excerpt allows. Overall a very helpful plugin.

    https://www.ads-software.com/extend/plugins/content-and-image-teaser/

  • The topic ‘[Plugin: Content and Image Teaser] Truncates Last Word If Content is Shorter than the Limit’ is closed to new replies.