• Resolved Erix Kivuti

    (@elzix)


    I initially had a problem with excerpt length.

    On looking at the code, I realized there’s a problem with the function get_the_trimmed_excerpt().

    In version 7.0.2, move line 937-953 (entire if ( mb_strlen( $excerpt )) to line 955, so that excerpt generated in line 925 is affected by $this->customs[ 'excerpt_length' ].

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Martin Stehle

    (@hinjiriyo)

    What is your problem with the excerpt length?

    Thread Starter Erix Kivuti

    (@elzix)

    Sorry, move to line 957.

    I want to put the post in footer with a short excerpt length. In line 925, $excerpt is set, and is not affected by if ( mb_strlen( $excerpt ) > $this->customs[ 'excerpt_length' ] ) in line 938.

    Plugin Author Martin Stehle

    (@hinjiriyo)

    This is on purpose. Because HTML code is allowed. Shortening it would lead to incorrect syntax, for example, closing HTML elements would be deleted. This can lead to errors in the design. Therefore the content is taken over unchanged.

    So you do the shortening manually on the excerpt.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Excerpt length function written wrong’ is closed to new replies.