<?php

/**
 * Template part for displaying posts
 *
 * @link https://developer.wordpress.org/themes/basics/template-hierarchy/
 *
 * @package glamer
 */

// Get the default layout from theme options
$default_layout = glamer_options('single_post_default_layout', 'right-sidebar');

// Check if the 'bs' parameter is set and sanitize it
$layout_override = isset($_GET['bs']) ? sanitize_text_field($_GET['bs']) : $default_layout;
// Check the layout and load the appropriate template
if ($layout_override == 'full-width') {
    get_template_part('template-parts/content-single-fullwidth');
} else {
    get_template_part('template-parts/content-single-sidebar');
}
