开发者 |
webdados
wonderm00n ptwooplugins wpexpertsio |
---|---|
更新时间 | 2023年8月16日 22:31 |
PHP版本: | 7.0 及以上 |
WordPress版本: | 6.3 |
og:title
.og:url
.og:description
.og:image
.og:url
.og:description
.og:image
.og:image
.og:type
to "product" and adds the price including tax to the product:price
and product:availability
tags. Also allows you to use the Product Category thumbnails as Open Graph Image and have Product Gallery images as additional Open Graph ImagesPlugins
menu in WordPressOptions
, Open Graph and Twitter Card Tags
to set it upog:image
tag on the source code? Make sure you're not using more than one plugin to set OG tags?Debug
. Then click on Scrape Again
to make sure Facebook gets the current version of your HTML code and not a cached version. If the image that shows up on the preview (bottom of the page) is the correct one, then the tags are well set and it "should" be the one that Facebook uses when sharing the post. If it still does not use the correct image when sharing, despite the debugger shows it correctly, there's nothing more we can do about that. That's just Facebook being Facebook.It's a shortcut to the Facebook Sharing Debugger, where you should click on Scrape Again
to make sure Facebook gets the current version of your post or page.
Each time you edit a post, if the option "Try to update Facebook Open Graph Tags cache when saving the post" is activated, we'll try to notify Facebook of the changes so it clears up its cache and read the new Open Graph tags of this specific URL.
If this is a new post and it's the first time you're saving it, the error is "normal" and you should ignore it (we're looking at a workaround to not show you this error).
If this is not a new post and it's not the first time you're saving it, and if this happens always, then maybe your server does not support calling remote URLs with PHP and you should disable the "Try to update Facebook Open Graph Tags cache when saving the post" option. In that scenario we recommend you use the Facebook Sharing Debugger to Scrape Again
each time you update your post.
Sometimes the plugin just can't update the Facebook cache itself and you may need to do it manually on the link provided above.
Yes, you can. Create a Facebook App and fill in the details on the "Facebook Open Graph Tags cache" panel of the plugin settings page. Do NOT ask us support on this. There is a blog post explaining everything you need to do.
No. Move along.
Pinterest can read Open Graph tags, so no extra tags are needed to share your articles or WooCommerce products as Rich Pins. You need however to apply to whitelist your domain on Pinterest. Head to this page and follow the instructions starting with "Set up". When in the validator, enter your URL, hit "Validate" and then choose "HTML tags" and hit "Apply now". It's then up to Pinterest to accept your application or not.
If there's a popular plugin you think we could get content from to use on the meta tags, use the support forum to tell us that.
If you are a plugin or theme author you can always use our filters fb_og_title
, fb_og_desc
, fb_og_url
, fb_og_type
, fb_type_schema
, fb_og_image
, fb_og_image_additional
, fb_og_image_overlay
, fb_og_locale
, fb_og_app_id
, fb_og_thumb_fill_color
, fb_og_output
and fb_og_enabled
to customize the Open Graph (and other) meta tags output.
= What is the array structure for the fb_og_image_additional
filter?
Check out this code snippet.
Go to the plugin settings and check the Do not get image size
option.
This happens on some edge cases we haven't yet been able to identify.
Update: Probably fixed for some users on 2.1.4.5 and completely on 2.2 (pending confirmation)
You can (and, in our opinion, you should) use both plugins. If you want to use Yoast SEO for your SEO needs and our plugin for social media meta tags you just have to go to "SEO > Social" and disable settings for Facebook and Twitter. If you don't find that option, because they've now made it harder to reach, you have to go to "SEO > Dashboard > Features > Advanced settings pages > choose Enabled and Save changes". Then you can reach "SEO > Social". Then set up our plugin as you wish and you're ready to go. We like to work with everybody, so (if you want to) our plugin can even integrate with Yoast SEO and use it's title, description and canonical URL on the Facebook and Twitter tags.
fb_og_image_overlay
with queried object informationfb_og_overlayed_image_format_jpg_quality
is available to change itfb_og_overlayed_image_format
to be able to output the overlayed image as png instead of jpgog:image:url
and og:image:secure_url
tagsfb_og_thumb_image
filter so you can have a diferent image overlay based on the post idog:description
for password protected and private posts (Thanks for the heads up Benoît)fb_og_enable_debug
filterTested up to
tagesc_attr
callsfb_og_image_size_use_partial
filterfb_og_image_size_cache
(which we do NOT recommend)og:type
to website
on non-singular pages because Facebook deprecated it (Thanks @alexiswilke)og:type
to website
instead of article
when a page is set as a blog pageproduct:availability
tag for WooCommerce products (Thanks @steveokk)Tested up to
and WC tested up to
tagsCURLOPT_FOLLOWLOCATION
to true
when trying to get image size via curl and avoid fatal errors (white screen of death) when the response returns 301 or 302 - Thanks @neonkowyfb_og_update_cache_url
filter so that developers can add their Facebook App ID and Secret to the URL when trying to update/clear cache on Facebook - Thanks @l3lackcatWC tested up to
tag on the plugin main fileTested up to
tagsanitize_textarea_field()
that only exists since 4.7.0 although we had a 4.0 minimum requirement (Thanks @l3lackcat)Requires at least tag
to 4.5 (to encourage the ecosystem to have WordPress updated)fb_og_image_additional
filterfb_og_app_id
filter so that plugins or themes can override the Open Graph Facebook App IDfb_og_disable
filter to completely disable the output based on the developer own rules - DUPLICATE - Use fb_og_enabled
instead and return false to it.fb_og_output
filter on the plugin global outputget_gallery_image_ids
instead of get_gallery_attachment_ids
, to get additional WooCommerce product images, from WooCommerce 3.0 up (Thanks Manu Calapez)og:
to product:
(Thanks davidtrebacz)Tested up to
tagfb_og_thumb_fill_color
filter can be used to use another color other than white, by returning an array with the rgb valueog:image
urlTested up to
tagfb_og_enabled
filter that allow other plugins/themes to completely disable the tags output on specific situationsWP_PLUGIN_DIR
instead of harcoded paths (Thanks thomasbachem)itemscope itemtype
to the HTML Tag in order to avoid W3C and Structured Data validation errorspublisher
tagog:price:amount
and og:price:currency
tags now correctly set as property
instead of name
Tested up to
tagfb_og_image_overlay
filter to be able to disable Overlay PNG programatically based on whatever needs of the developerog:type
to "product" and adds the price including tax to the product:price
tagstwitter:image:src
meta name to twitter:image
(Thanks mahler83)og:type
for WPML root pagesfb_og_type
filter so that plugins or themes can override the Open Graph Typefb_og_url
filter so that plugins or themes can override the Open Graph URLfb_og_image_additional
filter so other plugins/themes can add additional Open Graph Imagesfb_og_metabox_exclude_types
filter so other plugins/themes can hide our metabox on their CPTsfb_og_locale
filter so that plugins or themes can override the Open Graph locale tagog:url
, og:image
, etc...), thanks to "Doc75"og:image:width
and og:image:height
tags if Facebook is having problems loading the image when the post is shared for the first timeog:image
tag was not correctly setfb_og_title
, fb_og_desc
and fb_og_image
og:type
was not set correctly for the homepage in case it was a static page. Thanks to yakitoriog:url
/canonical
tag. Thanks to theonetruebixog:url
/canonical
on not known areas of WordPress. Not really a canonical url but better than using the homepage oneog:url
tag is now correctly set in the category listing pages.og:title
, og:url
, og:description
and og:image
tags with each listing details. If a featured image is set it will be used. If not, the listing main image is used.og:title
tag.og:image
is not hosted on the same domain as the website/blog.og:image
will be added to the RSS feed on the enclosure
and media:content
tags so that apps like RSS Graffiti and twitterfeed post them correctly.og:image
tag is set. It means that if the user doesn't want to use the featured/thumbnail image, or the first image in the post content, or the first image on the media gallery, or even the default image, he can choose not to.og:locale
tag. This will be the WordPress locale by default, but can be chosen by the user also.og:type
tag can now be set as "website" or "blog" for the homepage.og:description
tag.og:description
instead of the Website Tagline.og:image
tag.og:description
.og:app_id
and og:admins
not to be included by default.