Add Meta Tags Wordpress Plugin is used by 1,961 websites. Among 1,961, 5 sites are within top 10,000 and 77 sites are within top 100,000 websites.

Wordpress Plugin Information of

Plugin Meta Name Plugin Meta Information
Plugin Name
Plugin Description Add basic meta tags and also Opengraph, Schema.org Microdata, Twitter Cards and Dublin Core metadata to optimize your web site for better SEO.
Detail Plugin Description

Add-Meta-Tags (AMT) adds metadata to your content, including the basic description and keywords meta tags, Opengraph, Schema.org, Twitter Cards and Dublin Core metadata.

Since v2.8.1 it also supports the generation of metadata for product and product group pages for the WooCommerce and Easy-Digital-Downloads e-commerce plugins.

Since v2.8.7 a template tag for the generation of a semantic breadcrumb trail is available for use in your themes.

Add-Meta-Tags is actively maintained since 2006 (historical Add-Meta-Tags home).

Add-Meta-Tags is one of the personal software projects of George Notaras. It is developed in his free time and provided to you as Free software. Although the development is not donation driven, appreciation of the effort and the overall hard work via donations is much appreciated.

Goals

The goals of the Add-Meta-Tags plugin are:

  • be a free, yet high quality, metadata extension for the WordPress publishing platform.
  • provide efficient, out-of-the-box search engine optimization (SEO).
  • be customizable, yet simple and easy to use and configure, with minimal or no support.
  • be as lightweight as possible.
  • support advanced customization through the WordPress filter/action system (for developers and advanced users).

Free License and Donations

Add-Meta-Tags is released under the terms of the Apache License version 2 and, therefore, is Free software.

However, a significant amount of time and energy has been put into developing this plugin, so, its production has not been free from cost. If you find this plugin useful and if it has helped your blog get indexed better and rank higher, you can show your appreciation by making a small donation.

Donations in the following crypto currencies are also accepted and welcome. Send coins to the following addresses:

  • BitCoin (BTC): 1KkgpmaBKqQVk643VRhFRkL19Bbci4Mwn9

Thank you in advance for donating!

What it does

Add-Meta-Tags (AMT) adds metadata to your web site. This metadata contains information about the content, the author, the media files, which have been attached to your content, and even about some of the embedded media (see the details about this feature in the relevant section below).

Metadata refers to information that describes the content in a machine-friendly way. Search engines and other online services use this metadata to better understand your content. Keep in mind that metadata itself does not automatically make your blog rank better. For this to happen the content is still required to meet various quality standards. However, the presence of accurate and adequate metadata gives search engines and other services the chance to make less guesses about your content, index and categorize it better and, eventually, deliver it to an audience that finds it useful. Good metadata facilitates this process and thus plays a significant role in achieving better rankings. This is what the Add-Meta-Tags plugin does.

The following list outlines how and where metadata is added to a WordPress blog.

Basic meta tags

The description and keywords meta tags are added:

Front Page

  • Automatic addition of the blog's tagline in the description metatag.
  • Automatic addition of the blog's categories in the keywords metatag.
  • Customization is possible through the plugin's administration panel.
  • If a static page is used as the front page, customization is possible at the page's editing panel (Metadata box).

Posts & Pages

  • Automatic addition of an auto-generated excerpt of the post's or page's content in the description metatag. In case a post has a user-defined excerpt, then this is what is used.
  • Automatic addition of the post's categories and tags in the keywords meta tag. Pages do not support categories and tags, so there is no automatic addition of the keywords metatag.
  • Customization is possible by adding a custom description and keywords in the post's or page's editing panel (Metadata box).

Attachment Pages

  • A description metatag is automatically generated from the caption or, if a caption has not been set, from the description of the attachment.

Custom Post Types

  • A description is automatically generated from the first paragraph of the content. Keywords are not generated automatically.
  • Customization of the description and keywords meta tags is possible at the post type's editing panel (Metadata box).

Category-based Archives

  • The description of the category, if set, is used in the description meta tag. If a description does not exist, then a generic one is used.
  • The name of the category is always used in the keywords metatag.

Tag-based Archives

  • The description of the tag, if set, is used in the description meta tag. If a description does not exist, then a generic one is used.
  • The name of the tag is always used in the keywords metatag.

Custom Taxonomy based Archives

  • The description of the taxonomy term, if set, is used in the description meta tag. If a description does not exist, then a generic one is used.
  • The name of the taxonomy term is always used in the keywords metatag.

Author-based Archives

  • The bio of the WordPress user, if set, is used in the description meta tag on the first page of the author archive. All other author archive pages use a generic description.
  • The categories of the posts that are currently being displayed in the page are used in the keywords meta tag.

Extended Meta Tag Support

The following advanced features are also available:

Global keywords

  • It is possible to set some keywords that are prepended/appended to the keywords of all your content.

Site-wide META Tags

  • It is possible to force any metatags site-wide.

Custom title tag

It is possible to customize the title element on posts, pages and public custom post types.

'news_keywords' meta tag

It is possible to set a news_keywords meta tag for posts, pages and any public custom post type. For more info about the news_keywords metatag, please read this Google help page.

Per post full meta tags

It is possible to assign custom full meta tags to single posts (posts, pages, custom post types).

Per post referenced items (EXPERIMENTAL)

It is possible to enter URLs of referenced items in each single post (posts, pages, custom post types), which results in the generation of the relevant og:referenced (OpenGraph) and referencedItem (Schema.org) meta tags.

Copyright Metatag

It is possible to add a head link to a user-defined copyright page.

Default Image

A path to an image, for instance the we site's logo, can be set in order to be used in autogenerated metadata if a featured image has not been set for the content.

Opengraph metadata

Opengraph meta tags can be automatically added to the front page, posts, pages, attachment pages and author archive.

Schema.org Microdata

Schema.org Microdata can be automatically added to the front page, posts, pages, image attachment pages and author archive.

The plugin automatically marks up posts, pages and custom post types as Article objects and also images, videos and audio as Image, Video and Audio MediaObjects respectively. It also considers the web site as an Organization object and the author as a Person object.

Also, make sure you read Gingerling's guide about how to enable Google Authorship using the Add-Meta-Tags plugin on your WordPress blog (thanks Anna!).

Twitter Cards

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:

  • A summary card is generated for posts with one of the standard, aside, link, quote, status and chat formats.
  • A summary_large_image card is generated for posts with the image format. An image is expected to be attached or embedded to the post.
  • A gallery card is generated for posts with the gallery format. At least one image is expected to be attached or embedded to the post.
  • A photo card is generated for image attachment pages.
  • A player card is generated for posts with the audio or 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 below about how to use the available filters).

Dublin Core metadata

Dublin Core metatags can be automatically added to posts and pages and attachment pages.

Other Features

Extra SEO features

  • Add the NOODP,NOYDIR option to the robots meta tag.
  • Add the NOINDEX,FOLLOW options to the robots meta tag on category, tag, author or time based archives and search results.

Metadata Review Mode

When enabled, WordPress users with administrator privileges see a box (right above the post's content) containing the metadata exactly as it is added in the HTML head and body for easier examination. The box is displayed for posts, pages, attachments and custom post types.

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:

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 example 12 below 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 examples 13 & 14 below for more information about how to customize the metadata that is generated for WooCommerce and EDD products.

Semantic Breadcrumbs

Since v2.8.7 a template tag (amt_breadcrumbs()) for the generation of a semantic breadcrumb trail (Schema.org enhanced) is available for use in your themes.

Below is an example about how to use the template tag in your theme templates to generate a list of Schema.org microdata enabled breadcrumbs for WordPress Pages:

<?php
  if ( is_page() && function_exists('amt_breadcrumbs') ) {
    amt_breadcrumbs( array(
      // ID of list element.
      'list_id' => 'breadcrumbs',
      // Show breadcrumb item for the home page.
      'show_home' => true,
      // Text for the home link (requires show_home=true).
      'home_link_text' => 'Home',
      // Show breadcrumb item for the last page.
      'show_last' => true,
      // Show last breadcrumb as link (requires show_last=true).
      'show_last_as_link' => true,
      // Separator. Set to empty string for no separator.
      'separator' => '>'
  )); }
?>

The amt_breadcrumbs() template tag generates a HTML unordered list. By default, the ID attribute of the list is breadcrumbs or whatever you have set in the list_id option of the template tag (see above).

The following is entirely optional and not required in order to have semantic breadrumbs.

In order to connect the breadcrumbs Schema.org object to the web page's main Schema.org object which represents your content, the following manual actions are necessary:

  1. By default, the main Schema.org object that is autogenerated by Add-Meta-Tags for your content is the Article. Since the Article object does not support a breadcrumb property, it is essential to replace it with the WebPage object, which supports a hierarchical structure. This can easily be done by adding the following code to your theme's functions.php:
function amt_schemaorg_set_webpage_entity_on_pages( $default ) {
    if ( is_page() ) {
        return 'WebPage';
    }
    return $default;    // Article
}
add_filter( 'amt_schemaorg_object_main', 'amt_schemaorg_set_webpage_entity_on_pages' );
  1. Now that the main Schema.org object has been set to WebPage, we also need to interconnect it with the BreadcrumbList object, which is generated by the amt_breadcrumbs() template tag. This can be done by adding the breadcrumbs object's ID in the itemref attribute of the WebPage object with the following code (again in the functions.php file of the theme):
function amt_set_itemref() {
    if  ( is_page() ) {
        // Should return space delimited list of entity IDs
        return 'breadcrumbs';
    }
    return '';
}
add_filter( 'amt_schemaorg_itemref_content', 'amt_set_itemref' );

Now your semantic breadcrumbs have been connected to the main Schema.org object (WebPage).

In case you use code that generates other Schema.org objects throughout the web page, you can connect those objects to the main Schema.org object by attaching a filtering function like amt_set_itemref to the amt_schemaorg_itemref_content hook. The function must return a space delimited list of IDs.

Translations

There is an ongoing effort to translate Add-Meta-Tags to as many languages as possible. The easiest way to contribute translations is to register to the translations project at the Transifex service.

Once registered, join the team of the language translation you wish to contribute to. If a team does not exist for your language, be the first to create a translation team by requesting the language and start translating.

Code Contributions

If you are interested in contributing code to this project, please make sure you read the special section for this purpose, which contains all the details.

Support and Feedback

Please post your questions and provide general feedback and requests at the Add-Meta-Tags Community Support Forum.

To avoid duplicate effort, please do some research on the forum before asking a question, just in case the same or similar question has already been answered.

Also, make sure you read the FAQ.

Advanced Customization

Add-Meta-Tags allows filtering of the generated metatags and also of some core functionality through filters. This way advanced customization of the plugin is possible.

Add-Meta-Tags generates metadata that is used in the head area of the HTML page or embedded in the body (wrapped around the content or in the footer area).

The available filters are:

(Note: this list has been removed in order to reduce the size of the readme.txt, which caused problems to wordpress.org. Check: https://bitbucket.org/gnotaras/wordpress-add-meta-tags

Example 1: you want to replace the autogenerated og:site_name Opengraph metatag with a custom one.

This can easily be done by hooking a custom function to the amt_opengraph_metadata_head filter:

function customize_og_sitename_metatag( $metatags ) {
    // ... replace 'og:site_name' here
    return $metatags;
}
add_filter( 'amt_opengraph_metadata_head', 'customize_og_sitename_metatag', 10, 1 );

This code can be placed inside your theme's functions.php file.

Example 2: you want to limit the generation of metadata by Add-Meta-Tags to specific post types.

This can easily be done by hooking a custom function to the amt_supported_post_types filter:

function limit_metadata_to_post_types( $post_types ) {
    // ... process and return the $post_types array
    // ... or just return a custom array of post types
    return array( 'post', 'book', 'project');
}
add_filter( 'amt_supported_post_types', 'limit_metadata_to_post_types', 10, 1 );

This code can be placed inside your theme's functions.php file.

Example 3: you use plugin X that saves the descriptions, keywords, etc in its custom fields. You want to migrate to Add-Meta-Tags and need to read the fields of your old plugin.

This can easily be done by hooking custom functions to the amt_external_description_fields and amt_external_keywords_fields filters:

function read_old_plugin_description_field( $extfields ) {
    // Although $extfields is currently empty, it's a good practice to
    // append your old plugins description field to the $extfields array.
    array_unshift( $extfields, 'my_old_plugin_description_field' );
    return $extfields;
}
add_filter( 'amt_external_description_fields', 'read_old_plugin_description_field', 10, 1 );

function read_old_plugin_keywords_field( $extfields, $post_id ) {
    // This function also demonstrates how to get and possibly use the post's ID
    // Append your old plugins keywords field to the $extfields array
    if ( in_array( $post_id, array( 1, 2, 5, 8 ) ) ) {
        array_unshift( $extfields, 'my_old_plugin_keywords_field' );
    }
    return $extfields;
}
add_filter( 'amt_external_keywords_fields', 'read_old_plugin_keywords_field', 10, 2 );

This code can be placed inside your theme's functions.php file.

Keep in mind that:

  1. AMT internal fields have priority over the external fields. If both the internal field and an external field contain data, then the data of the internal field is used.
  2. AMT uses external fields to only read data. It never writes to external fields. Whenever the content is saved, every piece of information, which may have been read from an external field, is stored to the relevant AMT internal field. Consequently, when the content is saved, information from external fields is migrated to the AMT internal fields, and external fields have no effect on this specific content any more.

Example 4: Add the title element to the valid html elements for use in the full meta tags box.

This can easily be done by hooking custom functions to the amt_valid_full_metatag_html filter:

function extend_full_metatag_valid_elements( $valid_elements ) {
    // Construct the title element array (key: element name, value: array of valid attributes)
    $title_element = array( 'title' => array() );
    // Append the 'title' element to the valid elements
    $valid_elements = array_merge( $valid_elements, $title_element );
    return $valid_elements;
}
add_filter( 'amt_valid_full_metatag_html', 'extend_full_metatag_valid_elements', 10, 1 );

Example 5: Customize the default image sizes used when generating image related meta tags for front/archive, content and attachment pages.

This can easily be done by hooking custom functions to the amt_image_size_index, amt_image_size_content, amt_image_size_attachment filters:

Here we customize the generation of all image related meta tag, so that the full image size is used. Since the same image size is used for all types of pages, a single function is hooked to all filters.

function amt_use_full_image_size_in_all_meta_tags( $size ) {
    return 'full';
}
add_filter( 'amt_image_size_index', 'amt_use_full_image_size_in_all_meta_tags', 10, 1 );
add_filter( 'amt_image_size_content', 'amt_use_full_image_size_in_all_meta_tags', 10, 1 );
add_filter( 'amt_image_size_attachment', 'amt_use_full_image_size_in_all_meta_tags', 10, 1 );

This code can be placed inside your theme's functions.php file.

Example 6: Add the fb:admins and the fb:app_id OpenGraph meta tags.

This can easily be done by hooking a custom function to the amt_opengraph_metadata_head filter:

function amt_extend_og_metatags( $metatags ) {
    $metatags[] = '<meta property="fb:admins" content="ENTER_USER_ID_HERE" />';
    $metatags[] = '<meta property="fb:app_id" content="ENTER_APPID_HERE" />';
    return $metatags;
}
add_filter( 'amt_opengraph_metadata_head', 'amt_extend_og_metatags', 10, 1 );

This code can be placed inside your theme's functions.php file.

Example 7: Generate compact image meta tags (meta tags for width/height/type are suppressed).

This can easily be done by hooking a custom function to the amt_extended_image_tags filter:

function amt_generate_extended_image_tags( $default ) {
    return false;
}
add_filter( 'amt_extended_image_tags', 'amt_generate_extended_image_tags', 10, 1 );

This code can be placed inside your theme's functions.php file.

Example 8: Customize the generic descriptions in the category, tag, custom taxonomy and author archives.

This can easily be done by hooking custom functions to the amt_generic_description_category_archive, amt_generic_description_tag_archive, amt_generic_description_taxonomy_archive and amt_generic_description_author_archive filters:

function amt_custom_category_archive_description( $default ) {
    return 'Articles in the %s section.';
}
add_filter( 'amt_generic_description_category_archive', 'amt_custom_category_archive_description', 10, 1 );

function amt_custom_tag_archive_description( $default ) {
    return 'Products tagged with %s.';
}
add_filter( 'amt_generic_description_tag_archive', 'amt_custom_tag_archive_description', 10, 1 );

function amt_custom_mytaxonomyslug_archive_description( $default ) {
    return 'Members of the %s group.';
}
add_filter( 'amt_generic_description_mytaxonomyslug_archive', 'amt_custom_mytaxonomyslug_archive_description', 10, 1 );

function amt_custom_author_archive_description( $default ) {
    return 'Projects started by %s.';
}
add_filter( 'amt_generic_description_author_archive', 'amt_custom_author_archive_description', 10, 1 );

This code can be placed inside your theme's functions.php file.

Example 9: Programmatically customize the custom title as it has been entered in the post editing panel.

This can easily be done by hooking custom functions to the amt_custom_title filter. Please not that this filter is processed only if a custom title has been added to the post in the Metadata box.

function amt_custom_title_modified( $title ) {
    return $title . ' | ';
}
add_filter( 'amt_custom_title', 'amt_custom_title_modified', 10, 1 );

This code can be placed inside your theme's functions.php file.

Example 10: You want to set stricter permissions for the Metadata metabox.

This can easily be done by hooking a custom function to the amt_metadata_metabox_permissions filter.

function amt_custom_metadata_metabox_permissions( $default_permissions ) {

    //
    // This array contains the default Metadata metabox permission settings.
    // Regardless of these settings the 'edit_posts' capability is _always_
    // checked when reading/writing metabox data, so the 'edit_posts' capability
    // should be considered as the least restrictive capability that can be used.
    // The available Capabilities vs Roles table can be found here:
    //     http://codex.wordpress.org/Roles_and_Capabilities
    // To disable a box, simply add a very restrictive capability like 'create_users'.
    //
    $permissions = array(
        // Minimum capability for the metabox to appear in the editing
        // screen of the supported post types.
        'global_metabox_capability' => 'edit_posts',
        // The following permissions have an effect only if they are stricter
        // than the permission of the 'global_metabox_capability' setting.
        // Edit these, only if you want to further restrict access to
        // specific boxes, for example the 'full metatags' box.
        'description_box_capability' => 'edit_posts',
        'keywords_box_capability' => 'edit_posts',
        'title_box_capability' => 'edit_posts',
        'news_keywords_box_capability' => 'edit_posts',
        'full_metatags_box_capability' => 'edit_posts',
        'referenced_list_box_capability' => 'edit_posts'
    );

    return $permissions;
}
add_filter( 'amt_metadata_metabox_permissions', 'amt_custom_metadata_metabox_permissions', 10, 1 );

This code can be placed inside your theme's functions.php file.

Example 11: Customize the size of the video player in Player Twitter Cards.

This can easily be done by hooking a custom function to the amt_twitter_cards_video_player_size filter.

function amt_custom_twitter_cards_video_player_size( $default ) {
    return array(320, 240);
}
add_filter( 'amt_twitter_cards_video_player_size', 'amt_custom_twitter_cards_video_player_size', 10, 1 );

This code can be placed inside your theme's functions.php file.

Example 12: Generate product specific metadata.

Please note that Add-Meta-Tags has internal support for WooCommerce and Easy-Digital-Downloads e-commerce plugins. Just enable them in the plugin settings.

The following code assumes that e-commerce functionality is added by a plugin named xcom and aims to be an example about how to add Twitter Cards, Opengraph and Schema.org metadata to your product pages.

// Conditional tag that is true when our product page is displayed.
// If such a conditional tag is provided by the e-commerce solution,
// defining such a function is entirely optional.
function is_xcom_product() {
    // Check if xcom product page and return true;
}

// Conditional tag that is true when our product group page is displayed.
// If such a conditional tag is provided by the e-commerce solution,
// defining such a function is entirely optional.
function is_xcom_product_group() {
    // Check if xcom product group page and return true;
}

// Product page detection for Add-Meta-Tags
function amt_detect_xcom_product() {
    if ( is_xcom_product() ) {
        return true;
    }
    return false;
}
add_filter( 'amt_is_product', 'amt_detect_xcom_product' );

// Product group page detection for Add-Meta-Tags
function amt_detect_xcom_product_group() {
    if ( is_xcom_product_group() ) {
        return true;
    }
    return false;
}
add_filter( 'amt_is_product_group', 'amt_detect_xcom_product_group' );

// Twitter Cards for xcom products
function amt_product_data_tc_xcom( $metatags, $post ) {
    $metatags[] = '<meta name="twitter:label1" content="Genre" />';
    $metatags[] = '<meta name="twitter:data1" content="Classic Rock" />';
    $metatags[] = '<meta name="twitter:label2" content="Location" />';
    $metatags[] = '<meta name="twitter:data2" content="National" />';
    return $metatags;
}
add_filter( 'amt_product_data_twitter_cards', 'amt_product_data_tc_xcom', 10, 2 );

// Opengraph for xcom products
function amt_product_data_og_xcom( $metatags, $post ) {
    $metatags[] = '<meta property="product:price:amount" content="0.30" />';
    $metatags[] = '<meta property="product:price:currency" content="USD" />';
    $metatags[] = '<meta property="product:price:amount" content="0.20" />';
    $metatags[] = '<meta property="product:price:currency" content="GBP" />';
    return $metatags;
}
add_filter( 'amt_product_data_opengraph', 'amt_product_data_og_xcom', 10, 2 );

// Schema.org for xcom products
function amt_product_data_schemaorg_xcom( $metatags, $post ) {
    $metatags[] = '<meta itemprop="productID" content="isbn:123-456-789" />';
    $metatags[] = '<meta itemprop="priceCurrency" content="USD" />';
    $metatags[] = '<meta itemprop="price" content="100.00" />';
    return $metatags;
}
add_filter( 'amt_product_data_schemaorg', 'amt_product_data_schemaorg_xcom', 10, 2 );

This code can be placed inside your theme's functions.php file.

Example 13: Customize metadata for WooCommerce products.

// Twitter Cards for WooCommerce products
function amt_custom_woocommerce_tc( $metatags, $post ) {
    // Customize meta tags
    return $metatags;
}
add_filter( 'amt_product_data_woocommerce_twitter_cards', 'amt_custom_woocommerce_tc', 10, 2 );

// Opengraph for WooCommerce products
function amt_custom_woocommerce_og( $metatags, $post ) {
    // Customize meta tags
    return $metatags;
}
add_filter( 'amt_product_data_woocommerce_opengraph', 'amt_custom_woocommerce_og', 10, 2 );

// Schema.org for WooCommerce products
function amt_custom_woocommerce_schema( $metatags, $post ) {
    // Customize meta tags
    return $metatags;
}
add_filter( 'amt_product_data_woocommerce_schemaorg', 'amt_custom_woocommerce_schema', 10, 2 );

This code can be placed inside your theme's functions.php file.

Example 14: Customize metadata for Easy-Digital-Downloads products.

// Twitter Cards for EDD products
function amt_custom_edd_tc( $metatags, $post ) {
    // Customize meta tags
    return $metatags;
}
add_filter( 'amt_product_data_woocommerce_twitter_cards', 'amt_custom_edd_tc', 10, 2 );

// Opengraph for EDD products
function amt_custom_edd_og( $metatags, $post ) {
    // Customize meta tags
    return $metatags;
}
add_filter( 'amt_product_data_edd_opengraph', 'amt_custom_edd_og', 10, 2 );

// Schema.org for EDD products
function amt_custom_edd_schema( $metatags, $post ) {
    // Customize meta tags
    return $metatags;
}
add_filter( 'amt_product_data_woocommerce_schemaorg', 'amt_custom_edd_schema', 10, 2 );

This code can be placed inside your theme's functions.php file.

Example 15: Make metadata generators use category images added by external plugins.

This can easily be done by hooking a custom function to the amt_taxonomy_force_image_url filter.

// Use category images added by the 'Categories Images' plugin.
function use_taxonomy_images_by_categories_images() {
    if ( is_category() && function_exists('z_taxonomy_image_url') ) {
        return z_taxonomy_image_url();
    }
}
add_filter( 'amt_taxonomy_force_image_url', 'use_taxonomy_images_by_categories_images', 100, 2 );

This code can be placed inside your theme's functions.php file.

Example 16: Extend the Organization properties.

It would be impossible for Add-Meta-Tags to provide a web based interface for users to fill in even the most common Organization properties. Alternatively, it provides the amt_schemaorg_publisher_extra filter hook, which can be used in order to extend the default Organization properties (for the Person object use amt_schemaorg_author_extra).

In the following example, a filtering function (amt_schemaorg_publisher_extra_tags) is attached to the amt_schemaorg_publisher_extra hook and adds:

  • Extra social profile URLs (Youtube, LinkedIn).
  • Adds a postal address object to the Organization object.
  • Adds a 'sales' and a 'technical support' contact points to the Organization object.

IMPORTANT NOTICE: The following code only adds the metadata for your Organization. Make sure this information is also visible to your visitors in the current page.

function amt_schemaorg_publisher_extra_tags( $metatags ) {
    // Social profiles for LinkedIn, Youtube
    $metatags[] = '<meta itemprop="sameAs" content="https://www.youtube.com/channel/abcdef" />';
    $metatags[] = '<meta itemprop="sameAs" content="https://www.linkedin.com/in/abcdef" />';

    // Organization Postal Address
    $metatags[] = '<!-- Scope BEGIN: Organization Postal Address -->';
    $metatags[] = '<span itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">';
    $metatags[] = '<meta itemprop="streetAddress" content="WordPress Str. 123" />';
    $metatags[] = '<meta itemprop="postalCode" content="12345" />';
    $metatags[] = '<meta itemprop="addressLocality" content="City, Country" />';
    $metatags[] = '</span> <!-- Scope END: Organization Postal Address -->';

    // Sales
    $metatags[] = '<!-- Scope BEGIN: ContactPoint - Sales -->';
    $metatags[] = '<span itemprop="contactPoint" itemscope itemtype="http://schema.org/ContactPoint">';
    $metatags[] = '<meta itemprop="contactType" content="sales" />';
    $metatags[] = '<meta itemprop="telephone" content="+1-800-555-1212" />';
    $metatags[] = '<meta itemprop="faxNumber" content="+1-800-555-1213" />';
    $metatags[] = '<meta itemprop="email" content="sales(at)example.org" />';
    $metatags[] = '<!-- Scope BEGIN: OpeningHoursSpecification -->';
    $metatags[] = '<span itemprop="hoursAvailable" itemscope itemtype="http://schema.org/OpeningHoursSpecification">';
    $metatags[] = '<meta itemprop="opens" content="09:00" />';
    $metatags[] = '<meta itemprop="closes" content="21:00" />';
    $metatags[] = '<meta itemprop="dayOfWeek" content="Monday,Tuesday,Wednesday,Thursday,Friday" />';
    $metatags[] = '</span> <!-- Scope END: OpeningHoursSpecification -->';
    $metatags[] = '</span> <!-- Scope END: ContactPoint - Sales -->';

    // Technical Support
    $metatags[] = '<!-- Scope BEGIN: ContactPoint - Technical Support -->';
    $metatags[] = '<span itemprop="contactPoint" itemscope itemtype="http://schema.org/ContactPoint">';
    $metatags[] = '<meta itemprop="contactType" content="technical support" />';
    $metatags[] = '<meta itemprop="telephone" content="+1-800-555-1214" />';
    $metatags[] = '<meta itemprop="faxNumber" content="+1-800-555-1215" />';
    $metatags[] = '<meta itemprop="email" content="support(at)example.org" />';
    $metatags[] = '</span> <!-- Scope END: ContactPoint - Sales -->';

    return $metatags;
}
add_filter( 'amt_schemaorg_publisher_extra', 'amt_schemaorg_publisher_extra_tags' );

This code can be placed inside your theme's functions.php file.

Custom Fields

Add-Meta-Tags uses the following internal custom fields to store data related to the content:

  • _amt_description - the content's custom description (the description field is also read as a fallback for backwards compatibility).
  • _amt_keywords - the content's custom keywords (the keywords field is also read as a fallback for backwards compatibility).
  • _amt_title - the content's custom title.
  • _amt_news_keywords - the content's custom news keywords.
  • _amt_full_metatags - the content's full meta tag code.
  • _amt_image_url - URL of an image that overrides all other content images.
  • _amt_express_review - contains special notation of review related information.
  • _amt_referenced_list - list of URLs of items referenced in the post.

The contact methods added by Add-Meta-Tags are:

  • amt_facebook_author_profile_url as Facebook author profile URL (AMT)
  • amt_facebook_publisher_profile_url as Facebook publisher profile URL (AMT)
  • amt_googleplus_author_profile_url as Google+ author profile URL (AMT)
  • amt_googleplus_publisher_profile_url as Google+ publisher page URL (AMT)
  • amt_twitter_author_username as Twitter author username (AMT)
  • amt_twitter_publisher_username as Twitter publisher username (AMT)

Template Tags

The following template tags are available for use in your theme:

  1. amt_content_description() : prints the content's description as generated by Add-Meta-Tags.
  2. amt_content_keywords() : prints a comma-delimited list of the content's keywords as generated by Add-Meta-Tags.
  3. amt_metadata_head() : prints the full metadata for the head area as generated by Add-Meta-Tags.
  4. amt_metadata_footer() : prints the full metadata for the head area as generated by Add-Meta-Tags.
  5. amt_breadcrumbs() : prints an unordered list of semantic (Schema.org enabled) breadcrumbs.

Theme Requirements

Add-Meta-Tags uses the wp_head and wp_footer action hooks to embed metadata to the HTML HEAD and the HTML BODY. Therefore, it is essential that your theme includes these two action hooks in its templates.

More

Check out other open source software by George Notaras.

More Information Wordpress Official Plugin Repository
Google

Top 100 Websites built with Wordpress plugin

The Social Express News Live
Movimento ScambioEtico
Le Journal du Geek - JDG Network
Pearson Education North America
日刊SPA!
10,709 favicon of COREL.COM COREL.COM
Corel Corporation - Rest of Asia
10,776 favicon of SISTRIX.COM SISTRIX.COM
SISTRIX Toolbox - SEO-Tools von und für Profis
CG Persia
11,935 favicon of DREGOL.COM DREGOL.COM
Dregol
Touch Arcade: iPhone Game Reviews and News
Nigerian News from Leadership News
Gilabola.com | Berita Bola Terkini, Jadwal Bola, Hasil Pertandingan, Klasemen Liga, Berita Liga
13,535 favicon of RCS.IT RCS.IT
RCS MediaGroup
14,478 favicon of UI.AC.ID UI.AC.ID
Home Universitas Indonesia
16,698 favicon of OZOV.COM OZOV.COM
Ozov – Online games | Free to play!
Dumbing of Age - A college webcomic by David Willis
18,074 favicon of 3DPRINT.COM 3DPRINT.COM
3DPrint.com - 3D Printer & 3D Printing News
Study and Work in USA Blog – MS, MBA, H1B Visa 2015, F1 Visa|
21,994 favicon of IOLO.COM IOLO.COM
iolo technologies | PC Tune-Up Software Experts
Le Journal du Gamer - Feed the Gamer Inside
24,808 favicon of NEWS18.COM NEWS18.COM
News18.com: Latest News India, Breaking News, News Headlines Today - News18.com
26,943 favicon of TIMEINC.COM TIMEINC.COM
TimeInc.com Official Website|home
G&R | The Largest Online Ad Market in Bangladesh
31,674 favicon of LANEROS.COM LANEROS.COM
Laneros.com | Adicción Digital | Comunidad – Noticias de tecnología
App Cheaters - Game Reviews & Answers
AFTVnews | Amazon Fire TV & Fire TV Stick News, Guides, and Deals
34,171 favicon of JAFOSTE.NET JAFOSTE.NET
Já Foste - O teu site de entretenimento!
Cretapost.gr | Ότι συμβαίνει στην Κρήτη, την Ελλάδα και τον Κόσμο | Creta Post
Online Video Advertising Platform | SpotXchange
女子SPA!
39,906 favicon of IRACING.COM IRACING.COM
Online racing - iRacing is PC Sim Racing | iRacing.com
Three Percenter Nation — God, guns, and guts are what made America the land o' the free and at any price we must fight to keep all three.
43,228 favicon of OZOV.ME OZOV.ME
Play online games for free
Crafts, Patterns, DIY and Handmade Ideas from CraftGossip
Gold's Gym | Home | Fitness Gym
Cap Limpede - Stiri adevarate intr-un Cap Limpede!
APK MANIA™ Full » Android Apps, Games, Themes ...
Brett Rutecky
DeshGujarat
Asia News - Business Travel Tech Media | Asian Correspondent
Pakistani Talk Shows | Live News Feed | Political Discussion | Political Scandals
Prambors FM
MileValue | Maximize Frequent Flyer Miles and Credit Card Points
Talentnow – Recruitment Software, India
61,913 favicon of JDUBUZZ.COM JDUBUZZ.COM
Le Journal du Buzz - Feed the Buzz inside
Ezt nézd meg
Hosting, Web Hosting, Registro de Dominios, Hosting Linux, VPS - AdclicHosting.com - Hosting en Venezuela y el Mundo
Create Digital Music
온누리넷 멀티사이트 - 다른 워드프레스 사이트
Pearson Education North America
موقع الجيل الثالث الجزائر 3G ALGERIE
70,083 favicon of HBOL.JP HBOL.JP
ハーバービジネスオンライン
Divas Run For Bling | Because Everyone Needs A Little Bling
Free Homeschool Deals: Affording the Homeschool Life
Breaking News India, Current India News, Latest News Headlines | Free Press Journal
76,273 favicon of AFLAMY.COM AFLAMY.COM
أفلامي – مشاهدة افلام اونلاين – افلام اجنبى – افلام عربي – افلام هندى – افلام اسيويه – مسلسلات – كليبات – العاب
Indian Girls Club | Free Indian Sex Pictures and Videos
Shaadi Cares
Scoop Empire - Your Middle East Urban Destination
ReadyNAS by NETGEAR
Pinoy Tv Channel | Teleserye Replay Wow— Telebyuwers.ph | Pinoy Tambayan Community a Shared Video collection and REVIEW of Telenovela channel online
HR Manager Talent Solutions International Home - HR Manager Talent Solutions International
Sputnik & Pogrom
assoholics
Vakarų Lietuvos medicina
Capital Mind
AGP Deportes | Líder de noticias deportivas de Baja California
OfficeChai | All in a day's work
Ethno Performance Marketing | Dzo Marketing
92,110 favicon of NEXWAY.COM NEXWAY.COM
Nexway | Connected Commerce
92,901 favicon of POZE24.COM POZE24.COM
Poze24
Best Coupon Codes India | Grab All Working Snapdeal Coupons, Amazon Coupons, Flipkart Coupons & More
Pixelistes | Le numérique sous tous les angles
FREE Printable Worksheets – Worksheetfun / FREE Printable Worksheets for Preschool, Kindergarten, 1st, 2nd, 3rd, 4th & 5th Grade.
Умные часы
Ming-Mash | Only Serial keys & Cracks World
Web Design in Nigeria |Web Training | Web Developer in Lagos
100,581 favicon of SHOOT-SA.COM SHOOT-SA.COM
شووت : الموقع الرياضي الأكبر في السعودية والوطن العربي
THE GOVTSLAVES.INFO REPORT | "A Nation Of Sheep Ruled By Wolves"….Thomas Jefferson
101,549 favicon of PIONEERS.IO PIONEERS.IO
Pioneers Festival 2015 – Pioneers.io
Body Measurements | Celebrity measurements, bra size, height, weight and breast implants
103,091 favicon of COGZIDEL.COM COGZIDEL.COM
Custom Web Development Company, PHP Clone Scripts, iPhone & Android App Development India - Cogzidel Technologies
Home - The Paleo Mama
The Brothers Brick | LEGO Blog | LEGO news, custom models, MOCs, set reviews, and more!
106,478 favicon of BASHO.COM BASHO.COM
Basho
Classy Clutter -
Future Perfect - professional proofreading and English grammar consulting
Tercer Equipo Información deportiva
Bollywood Hot News, Gossips, Film Reviews, Movie Trailers, Celebs Wiki : Just Bollywood
Apollo Health City - Touching Lives
International fast money and cash transfer - MoneyPolo
116,032 favicon of JEYAMOHAN.IN JEYAMOHAN.IN
எழுத்தாளர் ஜெயமோகன்
116,343 favicon of BRIF.MK BRIF.MK
Бриф | Нешто повеќе!
116,641 favicon of OLISA.TV OLISA.TV
Olisa.tv | The Blogazine
Restaurant Delivery, Food Delivery: Doorstep Delivery Order Online! Restaurant Delivery, Food Delivery: Doorstep Delivery Order Online!
Really Good Emails - The Best Email Designs in the Universe (that came into my inbox)
Mommy Kat and Kids — Canadian Mom Blogger - Product Reviews, Travel and Parenting
118,722 favicon of KATORG.DE KATORG.DE
Katorg — Европейские интернет-магазины и каталоги
Украинский телекоммуникационный портал | о современных телекоммуникациях
119,084 favicon of ZELTENE.LV ZELTENE.LV
Zeltene