BCcampus / bcc-sage

BCcampus theme for marketing site
MIT License
2 stars 1 forks source link

Structured data for Event rich snippets #221

Open bdolor opened 5 years ago

bdolor commented 5 years ago

Submit a feature request or bug report


What is the current behavior?

Structured data, or microdata, helps present the information contained with our site in a predictable, knowable way, typically benefiting search engines and the like.

Currently we have structured data with missing elements, and are displaying errors.

image

What is the expected or desired behavior?

Using the tool at https://search.google.com/structured-data/testing-tool the goal is to ensure the structured data we have embedded in our theme is free from errors.


Bug report

Please provide steps to reproduce

copy the source code of any page on the development server, and paste it here: https://search.google.com/structured-data/testing-tool

alex-418 commented 5 years ago

Events: Single event pages represent an opportunity to take advantage of structured data because google could generate rich snippets in search results to promote our events.

Implementation: The Events plugin doesn't allow us to easily modify the code without rolling our own events calendar theme(not feasible for reasons previously discussed). Fortunately Google's preferred method is JSON-LD. Adding this manually is not ideal. I was able to find a plugin that attempts to tackle this specific problem for our events calendar plugin. Here's the specific function that does the magic. I'd prefer to create this functionality ourselves using this as a guide, rather than installing another plugin (time permitting).

alex-418 commented 5 years ago

Requires further investigation on approach. Also consider using the event endpoints from https://github.com/BCcampus/custom-rest-routes to generate the JSON-LD.

alex-418 commented 5 years ago

Structured data would be most valuable for Events, to help google generate rich snippets