Define a Custom Post Type (CPT) as a Product

WPSSO Core will auto-detect two known Custom Post Type (CPT) values as an Open Graph (and Schema) “product” by default:

  1. The “product” Custom Post Type (used by almost all e-commerce plugins).
  2. The “download” Custom Post Type (used by Easy Digital Downloads).

You can have WPSSO Core detect additional Custom Post Type (CPT) values as an Open Graph (and Schema) “product” by using the following example filter:

Change “YOUR-CUSTOM-POST-TYPE-NAME” to the Custom Post Type you want to define as a product.

When the Open Graph type is a “product”, additional product related fields will be available in the Social and Search Optimization metabox (availability, brand, color, condition, material, price, and size). Some of these options may have default values already assigned, depending on the e-commerce plugin you are using.

When the Open Graph type is an “article” (the default for standard WordPress posts and pages), product meta tags cannot be added since product meta tags are not part of the Open Graph article standard.

The WPSSO Schema JSON-LD Markup Pro add-on also includes a lot more markup for supported e-commerce plugins (Easy Digital Downloads, MarketPress, Woocommerce, and WP e-Commerce), including additional product images, currency, ratings, reviews, categories, tags, color, size, stock level, sale price, weight, dimensions, etc. The properties added to the Schema markup will depend on the attributes provided by the specific e-commerce plugin being used (Woocommerce, for example, provides the most complete product information). If no supported e-commerce plugin is found, WPSSO JSON will fallback to using the Open Graph product meta tag values for the matching Schema Product properties (availability, brand, color, etc.).

If you’re using custom fields (aka post meta) for some product values — like availability, brand, color, condition, currency, material, price, or size — you can enter these custom field names under the SSO > Advanced > Custom Meta settings page tab (for example, a custom field / post meta name might be “_product_availability” or similiar).