This code snippet must be placed in the theme where
the_excerpt() is located. This is for modifing manually entered excerpts NOT automatic ones WordPress will grab from the content.
It will display the first 260 characters of a manually entered excerpt but instead of ending on the 260th character it will truncate after the closest word. To change the number of characters simply change the value ‘260’ to another number. Remember to remove
the_excerpt() in your theme and replace it with this: