From 8337a078f6fec39d83ed8d8a443d14b15292d2c3 Mon Sep 17 00:00:00 2001 From: David Madl Date: Sun, 1 Mar 2026 22:36:21 +0100 Subject: [PATCH] for front page, show the Featured Image of the Page 33 (front page) --- ruady-og-head.php | 55 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/ruady-og-head.php b/ruady-og-head.php index 9ecc842..c092d39 100644 --- a/ruady-og-head.php +++ b/ruady-og-head.php @@ -44,6 +44,21 @@ final class Ruady_OG_Head { public static function render_head_markup(): void { // Adjust this if you only want standard posts: // if ( ! is_singular( 'post' ) ) { return; } + + if ( is_front_page() ) { + $html = self::build_markup_for_front_page(); + if ( $html === '' ) { + return; + } + echo "\n" . $html . "\n"; + return; + } + + if ( ! is_singular() ) { + return; + } + + if ( ! is_singular() ) { return; } @@ -86,6 +101,42 @@ final class Ruady_OG_Head { return $desc . $ellipsis; } + private static string $page_headline = "Da Ruady. Hansdampf in allen Gassen."; + + private static function build_markup_for_front_page(): string { + + $site_title = get_bloginfo( 'name' ); + $site_url = site_url(); + $site_url_p = parse_url($site_url); + $site_host = $site_url_p['host']; + + $og_image_url = get_the_post_thumbnail_url(33, 'full'); + $description = self::$page_headline; + $og_description = self::$page_headline; + + ob_start(); + ?> + + + + + + + + + + + + + + + + +