Skip to content

Instantly share code, notes, and snippets.

@bueltge
Last active November 15, 2025 12:13
Show Gist options
  • Select an option

  • Save bueltge/afe3feb67f1b08ac2f4b2a6ff195d112 to your computer and use it in GitHub Desktop.

Select an option

Save bueltge/afe3feb67f1b08ac2f4b2a6ff195d112 to your computer and use it in GitHub Desktop.
<?php
/**
* Plugin Name: Add LodgingBusiness Schema
* Description: Implementation of LodgingBusiness to make the identity and key features of your vacation home park machine-readable for search engines and AI services such as chatbots and knowledge graphs.
* Plugin URI: https://gist.github.com/bueltge/afe3feb67f1b08ac2f4b2a6ff195d112
* Version: 1.0.0
* Author: Ferienhaus Lichtung
* Author URI: https://www.ferienhaus-lichtung.de/
* Licence: GPLv2+
*/
add_action( 'wp_head', function() {
$schema = "\n\t";
$schema .= '<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "LodgingBusiness",
"name": "Ferienhaus Lichtung – Ihr Ferienhaus-Park im Thüringer Wald",
"description": "Exklusive Ferienhäuser in Ruhla am Rennsteig. Moderne Holzhäuser mit Kamin, Sauna und Panoramablick für einen erholsamen Familien- oder Paarurlaub.",
"url": "https://www.ferienhaus-lichtung.de/",
"image": "https://www.ferienhaus-lichtung.de/wp-content/uploads/2025/08/slider-herbst.jpg",
"priceRange": "€€",
"address": {
"@type": "PostalAddress",
"streetAddress": "Altensteiner Straße 34",
"addressLocality": "Ruhla",
"postalCode": "99842",
"addressRegion": "Thüringen",
"addressCountry": "DE"
},
"telephone": "+49 36929 799630",
"starRating": {
"@type": "Rating",
"ratingValue": "4.5",
"reviewCount": "1"
},
"checkinTime": "16:00",
"checkoutTime": "10:00",
"amenityFeature": [
{
"@type": "LocationFeatureSpecification",
"name": "Private Sauna / Infrarotsauna",
"value": true
},
{
"@type": "LocationFeatureSpecification",
"name": "Kamin",
"value": true
},
{
"@type": "LocationFeatureSpecification",
"name": "Kostenloses WLAN",
"value": true
},
{
"@type": "LocationFeatureSpecification",
"name": "Ladestation für E-Autos",
"value": true
},
{
"@type": "LocationFeatureSpecification",
"name": "Direkter Zugang zum Rennsteig",
"value": true
}
]
}
</script>';
echo $schema;
}, 10);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment