SEOv2 Update

This commit is contained in:
2026-01-23 20:05:38 +00:00
parent 6c27647a47
commit 4befb5e619
+10 -3
View File
@@ -107,12 +107,15 @@ function render_event_jsonld_graph(array $events): string {
foreach ($events as $e) { foreach ($events as $e) {
$start = $e['date'] . 'T' . ($e['time'] ?? '19:30') . ':00+02:00'; // Berlin Zeit im Sommer; vereinfacht $start = $e['date'] . 'T' . ($e['time'] ?? '19:30') . ':00+02:00'; // Berlin Zeit im Sommer; vereinfacht
$price = $e['price'] ?? ''; $price = $e['price'] ?? '';
$offers = $price !== '' ? [ $validFrom = $e['created_at'] ?? $e['updated_at'] ?? null;
$offers = $price !== '' ? array_filter([
"@type" => "Offer", "@type" => "Offer",
"url" => event_url($e),
"price" => preg_replace('/[^\d,\.]/', '', $price), "price" => preg_replace('/[^\d,\.]/', '', $price),
"priceCurrency" => "EUR", "priceCurrency" => "EUR",
"availability" => "https://schema.org/InStock" "availability" => "https://schema.org/InStock",
] : null; "validFrom" => $validFrom
]) : null;
$graph[] = array_filter([ $graph[] = array_filter([
"@type" => "Event", "@type" => "Event",
@@ -121,6 +124,10 @@ function render_event_jsonld_graph(array $events): string {
"startDate" => $start, "startDate" => $start,
"eventStatus" => "https://schema.org/EventScheduled", "eventStatus" => "https://schema.org/EventScheduled",
"eventAttendanceMode" => "https://schema.org/OfflineEventAttendanceMode", "eventAttendanceMode" => "https://schema.org/OfflineEventAttendanceMode",
"performer" => !empty($e['speaker']) ? [
"@type" => "Person",
"name" => $e['speaker']
] : null,
"location" => [ "location" => [
"@type" => "Place", "@type" => "Place",
"name" => $e['venue_name'] ?? "Veranstaltungsort", "name" => $e['venue_name'] ?? "Veranstaltungsort",