New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

storefront functions [json+ld] #620

Closed
inetbiz opened this Issue Jul 6, 2017 · 12 comments

Comments

Projects
None yet
4 participants
@inetbiz

inetbiz commented Jul 6, 2017

Your image object needs to conform to http://schema.org/ImageObject and is missing some principle items. I would like to feature request the caption, thumbnail and representativeOfPage properties be inserted / amended.

inetbiz added a commit to inetbiz/storefront that referenced this issue Jul 6, 2017

Add representativeOfPage attribute
Issue woocommerce#620 updates issue with one attribute

inetbiz added a commit to inetbiz/storefront that referenced this issue Jul 6, 2017

Update storefront-template-functions.php
Issue woocommerce#620 updates issue with one attribute
@inetbiz

This comment has been minimized.

Show comment
Hide comment
@inetbiz

inetbiz Jul 6, 2017

I'm not sure what to change in https://github.com/woocommerce/storefront/blob/master/inc/storefront-template-functions.php#L934 in order to get the $attr for image description. I think that should be used for http://schema.org/caption

inetbiz commented Jul 6, 2017

I'm not sure what to change in https://github.com/woocommerce/storefront/blob/master/inc/storefront-template-functions.php#L934 in order to get the $attr for image description. I think that should be used for http://schema.org/caption

@tiagonoronha

This comment has been minimized.

Show comment
Hide comment
@tiagonoronha

tiagonoronha Jul 6, 2017

Contributor

The structured date output is not present only in single pages/posts/products. It's also outputted to the homepage, archives, search results, etc.

For that reason, adding support for representativeOfPage is not that simple. Not all images are representative of the page.

I'll into this asap.

Contributor

tiagonoronha commented Jul 6, 2017

The structured date output is not present only in single pages/posts/products. It's also outputted to the homepage, archives, search results, etc.

For that reason, adding support for representativeOfPage is not that simple. Not all images are representative of the page.

I'll into this asap.

@inetbiz

This comment has been minimized.

Show comment
Hide comment
@inetbiz

inetbiz Jul 6, 2017

@tiagonoronha ah. When I looked at the WP image function used, it seemed it was just getting the featured image of a post. Ofc you could get all the images. I didn't know how that played out. I should have tested my code commit.

inetbiz commented Jul 6, 2017

@tiagonoronha ah. When I looked at the WP image function used, it seemed it was just getting the featured image of a post. Ofc you could get all the images. I didn't know how that played out. I should have tested my code commit.

@inetbiz

This comment has been minimized.

Show comment
Hide comment
@inetbiz

inetbiz Jul 6, 2017

Also this is how a category page should be written up. https://json-ld.org/playground/#/gist/c735f8a1c4f14523227e4064bfb61acb Maybe you can detect if yoast seo is installed. That plugin sets up the organization. We can just hook into it with an '@id` url fragment.

The primaryImageOfPage would be the category thumbnail's full image size. Keep that large for social networks that read json+ld to scrape the content for rendering the share.

inetbiz commented Jul 6, 2017

Also this is how a category page should be written up. https://json-ld.org/playground/#/gist/c735f8a1c4f14523227e4064bfb61acb Maybe you can detect if yoast seo is installed. That plugin sets up the organization. We can just hook into it with an '@id` url fragment.

The primaryImageOfPage would be the category thumbnail's full image size. Keep that large for social networks that read json+ld to scrape the content for rendering the share.

@inetbiz

This comment has been minimized.

Show comment
Hide comment
@inetbiz

inetbiz Jul 6, 2017

The main takeaway is there should never be more than one top level entity. A category page is a collection of like entities expressed in a nested entity of listitems that further have nested entities of product and offer.

A product page will be coming up this week. I added notes here since this function controls json+ld everywhere.

inetbiz commented Jul 6, 2017

The main takeaway is there should never be more than one top level entity. A category page is a collection of like entities expressed in a nested entity of listitems that further have nested entities of product and offer.

A product page will be coming up this week. I added notes here since this function controls json+ld everywhere.

@inetbiz

This comment has been minimized.

Show comment
Hide comment
@jvandriel

This comment has been minimized.

Show comment
Hide comment
@jvandriel

jvandriel Jul 6, 2017

"Also this is how a category page should be written up. https://json-ld.org/playground/#/gist/c735f8a1c4f14523227e4064bfb61acb"

I'd not use the above mentioned template for category pages but https://output.jsbin.com/vucuvex instead.

jvandriel commented Jul 6, 2017

"Also this is how a category page should be written up. https://json-ld.org/playground/#/gist/c735f8a1c4f14523227e4064bfb61acb"

I'd not use the above mentioned template for category pages but https://output.jsbin.com/vucuvex instead.

@inetbiz

This comment has been minimized.

Show comment
Hide comment
@inetbiz

inetbiz Jul 6, 2017

@jvandriel I think it's the exact same. But, using json playground. jsbin seemed to be running rather sluggish for me?

inetbiz commented Jul 6, 2017

@jvandriel I think it's the exact same. But, using json playground. jsbin seemed to be running rather sluggish for me?

@tiagonoronha

This comment has been minimized.

Show comment
Hide comment
@tiagonoronha

tiagonoronha Jul 7, 2017

Contributor

After looking into this a bit more, I found out that what I said above is not 100% correct. Since WooCommerce 3.0, structured data is handled by the plugin, and not Storefront.

Currently, Storefront is only outputting the json-ld format for non-WooCommerce pages.

We've also started a discussion internally about the value our integration of json-ld is adding, and we came to the conclusion that there are many plugins out there that do this much better than us.

For that reason, we'll be removing this functionality from the theme soon.

Suggested plugins:

https://wordpress.org/plugins/wordpress-seo/
https://wordpress.org/support/plugin/wp-structuring-markup

Contributor

tiagonoronha commented Jul 7, 2017

After looking into this a bit more, I found out that what I said above is not 100% correct. Since WooCommerce 3.0, structured data is handled by the plugin, and not Storefront.

Currently, Storefront is only outputting the json-ld format for non-WooCommerce pages.

We've also started a discussion internally about the value our integration of json-ld is adding, and we came to the conclusion that there are many plugins out there that do this much better than us.

For that reason, we'll be removing this functionality from the theme soon.

Suggested plugins:

https://wordpress.org/plugins/wordpress-seo/
https://wordpress.org/support/plugin/wp-structuring-markup

@inetbiz

This comment has been minimized.

Show comment
Hide comment
@inetbiz

inetbiz Jul 7, 2017

@tiagonoronha then you should strongly consider microdata format in html5. Persons in East Europe rely on Yandex. Yandex does not accept json+ld. A plugin cannot handle microdata insertion. Only new forked copies.

inetbiz commented Jul 7, 2017

@tiagonoronha then you should strongly consider microdata format in html5. Persons in East Europe rely on Yandex. Yandex does not accept json+ld. A plugin cannot handle microdata insertion. Only new forked copies.

@tiagonoronha

This comment has been minimized.

Show comment
Hide comment
@tiagonoronha

tiagonoronha Aug 14, 2017

Contributor

The following syntaxes are currently supported: JSON-LD, RDFa, microdata, and microformats.

https://tech.yandex.com/validator/

Contributor

tiagonoronha commented Aug 14, 2017

The following syntaxes are currently supported: JSON-LD, RDFa, microdata, and microformats.

https://tech.yandex.com/validator/

@JamesJosephFinn

This comment has been minimized.

Show comment
Hide comment
@JamesJosephFinn

JamesJosephFinn Aug 21, 2017

Just putting my chosen WP SEO tool here: Squirrly SEO is an excellent substitute/replacement for Yoast.

JamesJosephFinn commented Aug 21, 2017

Just putting my chosen WP SEO tool here: Squirrly SEO is an excellent substitute/replacement for Yoast.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment