Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    Sharing Titles and sharing descriptions use 2 different methods to get content:

    • For titles, Jetpack looks at the title entered in your post editor and remove HTML tags.
    • For descriptions, we look for an excerpt first. If it’s empty we grab the post content, remove all shortcodes thanks to the strip_shortcodes function (ref), remove HTML tags with wp_kses (ref), remove links, and make sure the whole description isn’t longer than 197 characters.

    Change the sharing title
    Since you entered the title in both languages in your post editor, that’s what Jetpack will return. You can, however, use the sharing_title filter (ref) to change the title used by Facebook, and remove one of the translations. If you’re not sure how to do that, I’d suggest contacting the xlanguage plugin author for help.

    Change the sharing description
    I’m not sure why strip_shortcodes doesn’t recognize [lang_en]. You’d have to ask the xlanguage plugin author how they built the shortcode, and see if they can update the plugin to get this fixed.

    I hope this helps.

    Thread Starter atrais

    (@atrais)

    Thank you Jeremy! I added propriate shortcodes to xlanguage and added override open graph elements. Now it seems fine. Facebook cache a lot though but on new posts this will work.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Sharing is not filtering content’ is closed to new replies.