NGFB / WPSSO – New “head_attributes” Filter

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

Continuing work on the Schema markup improvements from the last version, the “<head> Attributes Filter Hook” theme integration option has also been improved — Previously, the Schema itemtype was added to the <html> element attributes using the standard “language_attributes” WordPress filter. This defined the Schema itemtype for the webpage as a whole, which might be ok, except that some themes also define a second itemtype later in their template. The proper location for our Schema itemtype is in the <head> element attributes, to define the itemtype only for the meta tags being added by NGFB / WPSSO. Unfortunately WordPress and most theme templates do not have a standard filter for that element. In this new version, NGFB and WPSSO will check the header.php template for a standard <head> element, and if found, will suggest updating it with a new “head_attributes” filter. As an example:

And in context, here are the first three lines found in most header.php templates:

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.

2 thoughts on “NGFB / WPSSO – New “head_attributes” Filter

  1. My theme has on header.php added to the the standard “language_attributes” WordPress filter.
    Should I add “<head >” and delete previous html language_attributes?

    The beginning of my header.php:


    Felipe Z.

    • The formatting for your code didn’t come through properly. I updated the news item with an additional example, which includes both the <html> and <head> elements. ;-)



Comments are closed.