Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example JSON code for local business notations (use this snippet with WordPress)
<?php
// place this code into your theme's functions.php file
add_action('wp_head', function() {
echo '
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "LocalBusiness",
"address": {
"@type": "PostalAddress",
"addressLocality": "Amsterdam",
"addressRegion": "Noord-Holland",
"postalCode":"1000AB",
"streetAddress": "Hoofdstraat 1"
},
"description": "This is your business description.",
"name": "Company name",
"telephone": "+31 (0)314 7000000",
"url": "https://www.website.nl/",
"image": "https://www.website.nl/images/logo.png",
"openingHours": "Mo,Tu,We,Th,Fr 09:00-17:00"
</script>;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.