Key Notes about the Metadata Generators¶
- Table of contents
- Key Notes about the Metadata Generators
This section contains some details about the available metadata generators.
Add-Meta-Tags generates metadata, including the basic description and keywords meta tags, Opengraph, Schema.org, Twitter Cards and Dublin Core metadata, for the content of a WordPress powered web site.
Basic Meta Tags¶
Basic meta tags include the description and the keywords meta tags. These meta tags are generated on the front page, posts, pages, custom post types, attachment pages, category, tag, custom taxonomy and author archives.
Opengraph meta tags can be automatically added to the front page, posts, pages, custom post types, attachment pages and author archive.
It is possible to control the value of the
og:type meta tag either by changing the post format or programmatically via a filter. By default, the
og:type is set to
article for all content, except for video attachment pages and posts whose post format has been set to
video, on which
og:type is set to
Schema.org microdata can be automatically added to the front page, posts, pages, custom post types, attachment pages and author archives.
The plugin automatically marks up posts, pages and custom post types as
Article objects and also images, videos and audio as
Audio MediaObjects respectively. It also considers the web site as an
Organization object and the author as a
Twitter Cards can be automatically generated for content and attachment pages. The type of card that is generated depends either on the post format or the mime type of the attachment. More specifically:
summary card is generated for posts with one of the
summary_large_image card is generated for posts with the
image format. An image is expected to be attached or embedded to the post.
gallery card is generated for posts with the
gallery format. At least one image is expected to be attached or embedded to the post.
photo card is generated for image attachment pages.
player card is generated for posts with the
video format and for audio or video attachment pages. Regarding posts, an audio or video is expected to be attached or embedded to the post.
The generation of a
player card that renders a player for locally hosted audio and video files has very specific requirements, as outlined in the Player Card specifications. This is why there is a separate option in the plugin configuration panel that enables this feature. In short, enable this feature only if access over the secure HTTPS protocol (SSL) has been configured for your web site, otherwise the Player cards will not be rendered by Twitter.
Moreover, in order to generate the
twitter:image meta tag of the Player Card of locally hosted audio and video files, it is required to set a featured image on the attachment or on the parent post. By default, Add-Meta-Tags uses the
full size of the image for the generation of the
twitter:image meta tag. Advanced users can use the
amt_image_video_preview filter to customize this image size (see examples about how to use the available filters).
Dublin Core metadata¶
Dublin Core metatags can be automatically added to posts, pages, custom post types and attachment pages. It is not supported on archives or on the front page due to limitations of the specification.
Metadata for embedded media¶
Add-Meta-Tags generates detailed metadata for the media that have been attached to the content. This happens for all the media you manage in the WordPress media library.
Apart from attaching local media to the content, WordPress lets authors also embed external media by simply adding a link to those media inside the content or by using the
[embed] shortcode. Several external services are supported.
Add-Meta-Tags can detect some of those media and generate metadata for them. Currently, only links to Youtube, Vimeo and Vine videos, Soundcloud tracks and Flickr images are supported. So, even if you host your media externally on those services, this plugin can still generate metadata for them. This metadata is by no means as detailed as the metadata that is generated for local media, but it gives search engines a good idea about what external media are associated with your content.
This feature relies entirely on the data WordPress has already cached for the embedded media. The plugin will never send any requests to external services attempting to get more detailed information about the embedded media as this would involve unacceptable overhead.
Here is what is supported:
- Links to Youtube videos of the form:
- Links to Vimeo videos of the form:
- Links to Vine videos of the form:
- Links to Soundcloud tracks of the form:
- Links to Flickr images of the form:
This feature should be considered experimental. This information might be changed in future versions of the plugin.
Metadata for products¶
Add-Meta-Tags, since v2.8.0, supports the generation of OpenGraph, Schema.org and Twitter Cards metadata for products. Please check the Detect Custom Products and Add Metadata example for more information about how to make Add-Meta-Tags detect your product and product group pages.
Moreover, since v2.8.1 internal support for the WooCommerce and Easy-Digital-Downloads e-commerce plugins for WordPress is available. By enabling them in the plugin settings page Add-Meta-Tags is able to autodetect the product and product group pages and generate OpenGraph, Schema.org and Twitter Cards metadata. Please check the following examples for more information about how to customize the metadata that is generated for WooCommerce and EDD products:
Metadata for reviews¶
Add-Meta-Tags supports the generation of
Review schema.org entities for your content. In order to make this possible it is required to provide the review related information to Add-Meta-Tags. This can be achieved by enabling the Express Review metabox feature in the plugin settings and by entering the the review information in the Express Review text area under the Metadata section in the post editing screen.
The review information is expected to be in INI file syntax using the following rules:
- data is provided in
property = valuepairs
- sections are enclosed in brackets (
- a semicolon
;designates a comment
- The required properties are:
ratingValue, which is the rating in a 5 star rating system, eg
object, which must be the name of a schema.org Thing derivative entity, eg
name, which is the name of the reviewed item, eg a book title.
sameAs, which is an alternative representation of the item, usually a URL pointing to a web page that contains all the relevant information about the object.
- Any other extra properties can be specified either as a
property = valueor as a section.
- Sections are considered as sub objects, which are attached to a property of the reviewed item. The section name represents the property of the reviewed item to which the sub object is attached. Since sections represent objects, the
objectproperty with its value set to a valid schema.org entity must exist in every section.
Although extra properties are optional, in some cases it might be essential to add extra properties for specific types of object so as to pass metadata validator tests of various services. For instance, the Google Structured Data Validator requires books to also have the
author properties set.
Below is a sample of such review information:
; Review rating (required) ratingValue = 4.2 ; Mandatory reviewed item properties (required) object = Book name = On the Origin of Species sameAs = http://en.wikipedia.org/wiki/On_the_Origin_of_Species ; Extra reviewed item properties (optional) isbn = 123456 [author] object = Person name = Charles Darwin sameAs = https://en.wikipedia.org/wiki/Charles_Darwin