Hi, thanks for this nice plugin.
On some posts (written in Icelandic) I’ve noticed that the meta description is missing.
This happens on wp 3.6.1 with plugin version 2.0.7.
I’m not sure what exactly triggers this, but I managed to solve it by replacing this line:
$description = str_replace( "\r\n", ' ' , substr( strip_tags( strip_shortcodes( $post->post_content ) ), 0, 160 ) );
$charset = get_option( 'blog_charset' ); if( ! $charset ) $charset = 'UTF-8'; $wpfbogp_description = str_replace( "\r\n", ' ' , mb_substr( strip_tags( strip_shortcodes( $post->post_content ) ), 0, 160, $charset ) );
where I use
substr(), i.e. the multi-byte version of
- The topic ‘Problem with meta description due to substr()’ is closed to new replies.