<?php

if (! defined('ABSPATH')) {
    exit;
} require PUFFERGO_PLUGIN_DIR . '/templates/data/class-puffergo-blog-single-data.php';
$data = PufferGo_Blog_Single_Data::from_current_post();
global $wp_query;
$wp_query->comments = $data->comments;
$wp_query->comment_count = count($data->comments);
$wp_query->current_comment = -1;
$wp_query->max_num_pages = 1;
$wp_query->found_posts = 1;
$variant_id = PufferGo_Template_Loader::get_active_content_template('blog-single');
$template_file = PufferGo_Template_Loader::get_content_template_file('blog-single', $variant_id);
PufferGo_Template_Loader::render_layout_header();

if ($template_file) {
    require $template_file;
} else {
    echo '<main class="puffergo-fullpage-layout"><p>' . esc_html__('Template not found.', 'puffergo') . '</p></main>';
} PufferGo_Template_Loader::render_layout_footer();
