• Resolved filklore

    (@filklore)


    I like the Simmer plugin, but noticed a problem a while back, which discouraged me from using it. However, I have just delved into the plugin code and have fixed it, for my own benefit. Thought I would share here.

    The problem is that I tend to Crosspost content from my blog to a Facebook Group, and what Facebook displayed as the Link Preview was not what I needed.

    Instead of an item named

    ‘Easy Sweet and Sour Sauce’

    it was displaying

    ‘<span itemprop=”name”Easy Sweet and Sour Sauce</span>’

    The plugin was surrounding the title with html code, and this was picked up by Facebook and used to build the link to the article.

    It looks horrible and I didn’t like it.

    I found the offending lines were at the function add_title_schema at line 237 of class-simmer-frontend.php.

    I commented out the lines that actually wrap the title, and gave it another try. I half expected something to fall over, but I can’t see any problem in WordPress, and it now looks great in Facebook.

    I know what I should do is leave the function, and look for where it is called elsewhere, but for now, disabling the wrap suffices for me. If someone else has a more elegant solution, I will be interested.

    If anyone wants to look at this problem, simply look at the Facebook debugger page, and enter a link to a Simmer Recipe. You will see the effect under Link Preview, but also under “og:description

Viewing 1 replies (of 1 total)
  • Plugin Author L. Littlefield

    (@lchelak)

    Thank you for your comment.

    Please note that for most WordPress theme and plugin combinations, this bug does not exist. The bug reported here is due to a 3rd-party conflict with the theme or another plugin.

    To recreate this, please re-scrape your recipe through the Facebook tool with a default theme enabled. If this does not solve the issue, please de-active plugins one-by-one to isolate and find the conflicting plugin.

    To further test, please try using Simmer recipes from other websites in the Sharing Debugger. You will find that other examples of single and embedded recipes do not add the extra markup to the Facebook title. I can post further examples of recipes to show how this conflict doesn’t affect those sites.

    We also do not advise changing any of the core plugin files, as this can damage your site when you update to future versions or when updating plugins, code or themes related to Simmer. If you would like to extend the functionality of Simmer, we support a variety of custom hooks, filters and endpoints that you can use for development of a new extension plugin.

    Thanks again!

Viewing 1 replies (of 1 total)
  • The topic ‘OG:Description problem with links to Facebook.’ is closed to new replies.