[Plugin: WordPress SEO by Yoast] %%Excerpt%% for Chinese Character
-
Hello.
The plugin cannot auto generate %%Excerpt%% for Chinese Character. This is because it use substr which don’t support UTF-8.This can be fixed by changing /wordpress-seo/inc/wpseo-functions.php:
Search:
'%%excerpt%%' => ( !empty($r->post_excerpt) ) ? strip_tags( $r->post_excerpt ) : substr( strip_shortcodes( strip_tags( $r->post_content ) ), 0, 155 ),
Replace with:
'%%excerpt%%' => ( !empty($r->post_excerpt) ) ? strip_tags( $r->post_excerpt ) : mb_substr( strip_shortcodes( strip_tags( $r->post_content ) ), 0, 155,'utf-8' ),
Each time I upgrade the plugin, I have to do it manually. Would you fix it? Thanks.
Regards,
David Pi
- The topic ‘[Plugin: WordPress SEO by Yoast] %%Excerpt%% for Chinese Character’ is closed to new replies.