Microdata Attributes Missing in edd_microdata_title function
-
Hi,
I have been experiencing some issues while sharing the EDD Download pages via Google Plus.
Instead of the correct title, the HTML span tag was added in the Google Plus comments box, and it didn’t allow to edit it.
I noticed there is a filter function added to the_title in EDD named edd_microdata_title that is overriding the default title (see here: https://www.dropbox.com/s/j9sn0gbtrnpckny/Screenshot%202014-08-22%2015.10.00.png?dl=0 ).
The code there seems to add itemprop but itemtype and itemscope are missing.
So in order to fix it I removed the filter in functions.php using remove_filter() and then added the schema itemprop attribute manually to the theme file making sure the missing attributes are there: itemscope=”” itemtype=”https://schema.org/Product”.
Now the code in the theme’s product page looks like:
<h1><span itemprop="name" itemscope="" itemtype="https://schema.org/Product">Simple Business PowerPoint Template</span></h1>
You may consider to add itemscope=”” itemtype=”https://schema.org/Product” to the edd_microdata_title filter in a future release in order to troubleshoot this issue.
In my case, it is now working when sharing a page like this one https://slidemodel.com/templates/simple-business-powerpoint-template/ using Google Plus.
Thanks,
Julian
- The topic ‘Microdata Attributes Missing in edd_microdata_title function’ is closed to new replies.