Skip Navigation

[Resolved] create a schema org compliant product page with content template features

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Waqar 1 year, 5 months ago.

Assisted by: Waqar.

Author
Posts
#2488899

Tell us what you are trying to do?

i need to produce an output where the single elements of the product page are compliant with schema.org > product type: i use a content template to output several custom fields & taxonimies i created with toolse, and i tried BOTH a manual creation (using direct coding) AND block editor, but they all return the identical issue: there is NO schema.org attributes and structure in the html output. if i use the shortcode [wpv-woo-product-price] (but as i said using the block editor has the same problem) i get a complex structure BUT not a schema.org compliant product markup: e.g. this product hidden link uses the content template with this content structure:

<strong itemprop="priceSpecification">
[wpv-woo-product-price]

and if i look at the resulting page source on the front end, i find that the part generated by the price shortcode is the following:

<strong itemprop="priceSpecification">
<p class="price wooviews-product-price">
<span class="woocommerce-Price-amount amount">
<bdi>
22,00<span class="woocommerce-Price-currencySymbol">€</span>
</bdi>
</span>
</p>

so we can see that the shortcode itself generates a not complaint markup, and google has a problem indexing it.

the errors are (see hidden link): 1. the price value is not isolated and properly marked up; 2. the "content" attributes are not displayed and valued (the number must be properly formatted); 3. other problem about currency, availability

How can i obtain a schema.org compliant product page?

Is there any documentation that you are following? hidden link

Is there a similar example that we can see?

What is the link to your site? hidden link

thx,
s.

#2489327

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting us and I'd be happy to assist.

If you'd like to construct the structured data markup for the product type manually, you can copy and paste the example data in your desired format from the examples section at:
hidden link

Next, to make the data dynamic, you can use the relevant shortcodes, for example, for the simplified/raw price you can use the "wpv-post-field" shortcode:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-field


[wpv-post-field name="_sale_price"]

A simpler alternative can be to use a third-party plugin like "Schema & Structured Data for WP & AMP":
https://wordpress.org/plugins/schema-and-structured-data-for-wp/

I've tested it and it works by automatically adding the product type structured data in the head section of the product page, in the "JSON-LD" format.

I hope this helps.

regards,
Waqar

#2491077

Hi Waqar, thxs for your help, it worked 😀

But i have a developing question, now: do you think would be a good improvement to insert by default in all the toolset/content/views blocks the proper schema.org for products (and so on for web pages, posts, events, etc. for the standard WP generated elements from toolset), both in the blocks AND the custom coding in content templates and views? maybe as an optional checkbox "compliant to schema.org" or something like that: if you need that compliance, you check che element and the system will include all the html elements/attributes required by the proper schema.org makup.

#2491767

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thanks for the update and glad that it worked.

We have an internal ticket on improving the structure data support out-of-the-box, but with the current development status of the Toolset ( ref: https://toolset.com/2022/06/whats-next-for-toolset/ ), it would be difficult to suggest how long it will take.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.