/** * Adjust content_width value according to template. * * @return void */ function the_minimal_template_redirect_content_width() { // Full Width in the absence of sidebar. if (is_page()) { $sidebar_layout = the_minimal_sidebar_layout(); if ($sidebar_layout == 'no-sidebar' || !is_active_sidebar('right-sidebar')) { $GLOBALS['content_width'] = 1139; } } elseif (!is_active_sidebar('right-sidebar')) { $GLOBALS['content_width'] = 1139; } }
<?php /** * The template for displaying all pages. * * This is the template that displays all pages by default. * Please note that this is the WordPress construct of pages * and that other 'pages' on your WordPress site may use a * different template. * * @link https://codex.wordpress.org/Template_Hierarchy * * @package The_Minimal */ get_header(); $sidebar_layout = the_minimal_sidebar_layout(); ?> <div id="primary" class="content-area"> <main id="main" class="site-main" role="main"> <?php while (have_posts()) { the_post(); get_template_part('template-parts/content', 'page'); } // End of the loop. ?> </main><!-- #main --> </div><!-- #primary -->