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(); + ?> + + + + + + + + + + + + + + + + +