Support » Plugin: Thumb Fixer for Social Media » Woocommerce Products appear as og:type article

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Jason

    (@galapogos01)

    Further to the above, I have also found that the shop home page (/shop by default) shows an og:url of the first category within the shop (ie. /shop/black-widgets/), rather than the shop page itself!

    Thread Starter Jason

    (@galapogos01)

    Lastly… would it be at all possible to add an option to put the Site Name in og:title?

    Plugin Author Michael Ott

    (@mikeyott)

    Hi,

    Sorry to report I haven’t considered any woo commerce support at this stage. If enough people ask for it I’d definitely consider it though.

    Regarding the Site Name in og:title, it does already work that way. Go to Settings -> General and whatever your site name is will appear in the og:title.

    Thread Starter Jason

    (@galapogos01)

    Thanks for the reply.

    Are you sure regarding Site Name? og:title only includes the Page title here, not the Site Title (from Settings->General). That appears in og:site_name.

    Regarding WooCommerce support, if you could point to where in the code the post_type could be detected and the additional meta tags added for a Product (price etc), that would be great. I haven’t had a look yet, and I’d be happy to contribute the code back to the plugin.

    Cheers,
    Jason

    Plugin Author Michael Ott

    (@mikeyott)

    Sorry, you are correct: But also:

    The site title appears in og:title and og:site_name for the homepage.
    For all other pages og:title will use the post or page title.

    Regarding adding woo support, look in the code for this comment:

    // Add metabox for Object Types

    If you do add the woo custom post type that would be cool. More power to the plugin 🙂

    Thread Starter Jason

    (@galapogos01)

    I think I was having some issues with is_home() given my theme uses a custom post type for the homepage; apparently the correct function to use is is_front_page().

    I’ve had a crack at supporting the WooCommerce product type. It adds the Price and Currency tags when the post type is of “product”. This avoids having to set the ftf custom meta tags for every product in a store. It passes the Facebook debugger.

    Find a copy at http://pastebin.com/hWXatYXr

    Cheers,
    Jason

    Plugin Author Michael Ott

    (@mikeyott)

    Thanks Jason,

    It seems fine except it doesn’t seem to work when the product has no image (an unlikely scenario but still a possibility). In this situation the open graph output is that of a post with no image.

    I don’t have time to investigate (but line 336 will give you a clue), but if you get it sorted I’ll happily commit it to the repo and credit you in the code comments.

    This conversation might be better over email. DM me on twitter and I’ll give you my email address. @mikeyott

    Thread Starter Jason

    (@galapogos01)

    Have just followed you but can’t DM you until you follow me back.

    In the meantime, here’s a fixed version — http://pastebin.com/4fg7WxWa

    Jason

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Woocommerce Products appear as og:type article’ is closed to new replies.