Skip to content

Instantly share code, notes, and snippets.

@finalwebsites
Created February 17, 2019 12:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save finalwebsites/0b007970ebfd32c859575d75cc21d46d to your computer and use it in GitHub Desktop.
Save finalwebsites/0b007970ebfd32c859575d75cc21d46d to your computer and use it in GitHub Desktop.
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