diff --git a/tag.php b/tag.php index 2ee1155e52..b2ebcce77a 100644 --- a/tag.php +++ b/tag.php @@ -40,6 +40,9 @@ $post = Timber::query_post(false, Post::class); // phpcs:ignore WordPress.WP.GlobalVariablesOverride.Prohibited $context = Timber::get_context(); +if ($post instanceof \WP_Post) { + $post = new Post($post->ID); +} Context::set_og_meta_fields($context, $post); $context['tag'] = $tag;