pedrorafael
Forum Replies Created
-
Forum: Plugins
In reply to: [WooCommerce] Structured data (snippets)Hi,
everything worked!
Thank you.
Pedro.
Hi @titodevera,
thanks for the reply!
Sorry, I had to remove the plugin because Google is not indexing the structured data. After I removed the plugin and added the code below on the site everything returned to normal and the brand information I need a lot.
<script type=”application/ld+json”>
{
“@id”:”’.get_permalink().’”,
“@context”: “https://schema.org/”,
“brand”: {
“@type”: “Thing”,
“name”: “’.$brand->name.’”
}
}
</script>I reproduce the same error that appears in an online site on localhost:
https://7z7eja.by3301.livefilestore.com/y4mIc7BoqwGT0o_6XV9rLmXMzoJ73yCbZ2pECcXearzj2bRwulkXjINQNszQriB3aulND_jfZDija4Hkj96Ry0pq9EvE-Ppj1k0_M_Xtgt_K-CF4fYVkaJ6-ivCIx2-4AoVX9VWIDOyPisknytV2IiHhK37lPZa3KFLP72kir8tGeTZYgL_QTj3YhdTTIQBooKPIUmMXj9Wn5rxftf_Q076CA/error.fw.png?psid=1I would like to reuse the plugin, but the code(<meta itemprop=”brand” content=”’.$brand->name.’”>) causes error in the structured data…
Could change this directly in the code, but this in the next update this would be deleted and the problem would come back.
You could direct me to where I should go to change the code (<meta……>) by the code (<script type=”application/ld+json……></script>) that I exemplified?
Thank you very much and your plugin is one of the best I know.
Pedro.
Hi,
I fixed this after a lot of research…
One suggestion to further improve your great plugin is to override the current code:
<meta itemprop=”brand” content=”My Brand”>
for this
<script type=”application/ld+json”>
{
“@id”:”ID PAGE HERE”,
“@context”: “https://schema.org/”,
“brand”: {
“@type”: “Thing”,
“name”: “BRAND HERE”
}
}
</script>This correctly integrates with the Woocommerce codes for structured data that can be tested here: https://search.google.com/structured-data/testing-tool/u/0/
Thank you,
Pedro.
Hi,
when activating the plugin breaks everything … At the moment I will wait for the plugin to mature a little more.
Thank you!