File: /var/www/e-tdr.com/e-tdr/wp-content/themes/e-tdr/inc/schema-markup.php
<?php
/**
* Schema Markup (JSON-LD Structured Data)
*
* Outputs structured data in the <head> for e-tdr.com.
*
* @package e-TDR
*/
add_action('wp_head', function () {
if (!isset($_SERVER['HTTP_HOST']) || $_SERVER['HTTP_HOST'] !== 'e-tdr.com') {
return;
}
// Get logo from ACF Options page
$logo = get_field('header_logo', 'option');
// If ACF image field returns array, get URL
if (is_array($logo) && isset($logo['url'])) {
$logo_url = $logo['url'];
} else {
$logo_url = '';
}
$site_url = 'https://e-tdr.com/';
?>
<script type="application/ld+json">
[{
"@context": "https://schema.org",
"@type": "Organization",
"name": "e-TDR",
"url": "<?php echo esc_url($site_url); ?>",
"logo": "<?php echo esc_url($logo_url); ?>",
"description": "e-TDR is a digital platform for managing and trading Transferable Development Rights (TDR), enabling governments, developers and landowners to securely buy, sell and manage development rights online.",
"foundingDate": "2026"
},
{
"@context": "https://schema.org/",
"@type": "WebSite",
"name": "e-TDR",
"url": "<?php echo esc_url($site_url); ?>",
"potentialAction": {
"@type": "SearchAction",
"target": "<?php echo esc_url($site_url); ?>?s={search_term_string}",
"query-input": "required name=search_term_string"
}
},
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [{
"@type": "ListItem",
"position": 1,
"name": "Home",
"item": "<?php echo esc_url($site_url); ?>"
}]
},
{
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [{
"@type": "Question",
"name": "What is Transferable Development Rights (TDR)?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Transferable Development Rights (TDR) allow landowners to transfer unused development potential from one property to another."
}
},
{
"@type": "Question",
"name": "What is an electronic TDR platform?",
"acceptedAnswer": {
"@type": "Answer",
"text": "An electronic TDR platform enables digital management, trading and verification of development rights certificates."
}
}
]
}
]
</script>
<?php
});