From 6a27f5118978bbaab3e0becb91d787188072ddf5 Mon Sep 17 00:00:00 2001 From: Vencislav Atanasov Date: Fri, 8 Sep 2023 13:20:44 +0300 Subject: [PATCH] Fix blog_slug not being global --- functions.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/functions.php b/functions.php index d2abd54..1307972 100644 --- a/functions.php +++ b/functions.php @@ -9,6 +9,8 @@ add_filter( 'the_excerpt', 'do_shortcode'); // OpenGraph image for FB/Twitter function og_image( $tags ) { + global $blog_slug; + $imagePath = __DIR__ . '/img/' . $blog_slug . '_fb_preview.jpg'; if (file_exists($imagePath)) {