NGFB / WPSSO – Pre-defined Meta Tags for CPTs

NextGEN Facebook (NGFB) version 8.14.0 and WordPress Social Sharing Optimization (WPSSO) version 3.14.0 have been released.

Using WPSSO as an example, this latest version provides an easy way to connect WPSSO to Custom Post Types (CPTs). If your theme (or another plugin) uses the following CPTs, WPSSO will pre-populate its Open Graph meta tags array with standard meta tags for that type. The following CPTs are recognized:

  • article
  • book
  • music.album
  • music.playlist
  • music.radio_station
  • place
  • product
  • profile
  • video.episode
  • video.other
  • video.tv_show

By default, WordPress Posts, Pages, and unrecognized CPTs are classified as articles. Developers can hook the standard ‘wpsso_og’ filter to modify the Open Graph meta tag array as a whole, or by defining the WPSSO_FILTER_SINGLE_TAGS constant as true, can also hook individual meta tags. These individual meta tag hooks can return a string or an array of values.

Here’s a practical example showing how to set the ISBN meta tag from a custom field value for a ‘book’ CPT:

Individual meta tag filter names are constructed based on the meta tag attributes and their values. For example, the previous ISBN example filter name references the following meta tag:

September 14, 2015 – WPSSO Replaces NextGEN Facebook (NGFB)

NextGEN Facebook (NGFB) is being replaced by the WordPress Social Sharing Optimization (WPSSO) plugin. WPSSO is a fork / child of NGFB — they have the same author, the same core features and code-base, but WPSSO is distributed without the sharing buttons and their related features (making WPSSO about 25% smaller than NGFB). Additional extension plugins are also available for WPSSO, including:

Review the simple NGFB to WPSSO migration instructions if you would like to switch from NGFB to WPSSO.