Last active
April 15, 2019 18:47
-
-
Save warnakey/966634415ab9d7017c0c889dd1225053 to your computer and use it in GitHub Desktop.
Speakable Schema Example for WordPress (will use the meta description of each page for the speakable schema)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- This schema can go in the header.php file of any WordPress site --> | |
<script type="application/ld+json"> | |
{ | |
"@context": "https://schema.org/", | |
"@type": "WebPage", | |
"name": "<?php the_title(); ?>", | |
"speakable": | |
{ | |
"@type": "SpeakableSpecification", | |
"xpath": "/html/head/meta[@name='description']/@content" | |
}, | |
"url": "<?php the_permalink(); ?>" | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment