3
votes
Custom schema.org itemtypes filter
There doesn’t seem to be a way to filter the schema.org `itemtype` attribute on articles and right now, all attributes are set to “CreativeWork”, which is not always correct for things like events, recipes, products, etc.
Looking at the `single.php` template, I see this:
““
itemscope=”itemscope” itemtype=”https://schema.org/CreativeWork>
““
I know I can create a `single-product.php` file in a child theme but I’m trying to avoid doing that to cater for just one (tiny) change. I can see you already have a `wpbf_body_itemtype` filter so can I suggest a similar function to cater for a `wpbf_article_itemtype` filter which defaults to `CreativeWork’ but can be overwritten?
Leave a Reply
One Comment
-
Hi Ivan,
this is going to be added with the next release. 2 new filters to allow you to change the itemtype on posts & archives (wpbf_archive_itemtype & wpbf_single_itemtype)
Best,
David
Comments are closed.
One Comment
Hi Ivan,
this is going to be added with the next release. 2 new filters to allow you to change the itemtype on posts & archives (wpbf_archive_itemtype & wpbf_single_itemtype)
Best,
David