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:

Continue reading