Created
October 16, 2024 19:19
-
-
Save finalwebsites/d59991d73ad99b419cb5e44433ac05ab to your computer and use it in GitHub Desktop.
Structured organization data for WordPress websites
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
<?php | |
add_action('wp_head', 'fws_create_organisatie_data'); | |
function fws_create_organisatie_data() { | |
$data = array( | |
'@context' => 'https://schema.org', | |
'@type' => 'Organization', | |
'name' => 'Bedrijfsnaam', | |
'legalName' => 'Volledig bedrijfsnaam', | |
'url' => 'https://www.website.nl/', | |
'logo' => 'https://www.website.nl/images/logo.jpg', | |
'foundingDate' => '2020', | |
'address' => array( | |
'@type' => 'PostalAddress', | |
'streetAddress' => 'Hoofdstraat 1', | |
'addressLocality' => 'Amsterdam', | |
'addressRegion' => 'Noord-Holland', | |
'postalCode' => '1000 AB', | |
'addressCountry' => 'NL', | |
), | |
'contactPoint' = array( | |
'@type' => 'ContactPoint', | |
'contactType' => 'Customer Service', | |
'telephone' => '+31-20-1234567', | |
'email' => '[email protected]', | |
), | |
'sameAs' = array( | |
'https://www.facebook.com/bedrijfsnaam', | |
'https://www.linkedin.com/company/je-bedrijfsnaam/' | |
) | |
); | |
echo ' | |
<script type="application/ld+json"> | |
'.json_encode($data, JSON_UNESCAPED_SLASHES).' | |
</script> | |
'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
More details:
https://developers.google.com/search/docs/appearance/structured-data/organization