WordPress.org

Support

Support » Plugins and Hacks » Subscribe2 » [Resolved] Excerpt in subscription email

[Resolved] Excerpt in subscription email

Viewing 5 replies - 1 through 5 (of 5 total)
  • @cheauyuin,

    I use UTF-8 myself so I don’t think it has anything to do with the character encoding specifically, although it may be the combination of the encoding and your current language.

    I don’t know much about the chinese language but are there spaces like in Western languages?

    Subscribe2 creates the excerpt one of three ways, in the following order:
    1/ Take the excerpt as written by the post author.
    2/ Take the content before the HTML more tag.
    3/ Take the first 50 words or so using spaces as delimiters.

    So, if there is no defined excerpt, no more tag and there are no spaces in the content then the entire content would get used.

    The ‘fix’ would be to write your own excerpt or use a more tag if the above seems likely.

    @mattyrob

    I guess I know why, Chinese characters doesn’t require spaces in between words, and delimiters could appear in between 10 or more words, and no spaces between delimiters and words required!

    Thanks for your prompt reply. Looks like I’m going to write my own excerpt. Thanks! 😉

    @cheauyuin,

    Thanks for following up and teaching me more about Chinese. You can programmatically change the excerpt length with a filter. Write your own little plugin and use code like this:

    function my_excerpt() {
    	// return whatever number of words you want the excerpt length to be
    	return 30;
    }
    add_filter('s2_excerpt_length', 'my_excerpt');

    That would remove the need for you to create your own excerpt. You would need to use a very low number – like 1 or 2 to capture the text before the first delimiter.

    Thanks, mattyrob!

    @cheauyuin,

    You are most welcome.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Excerpt in subscription email’ is closed to new replies.
Skip to toolbar