please post the code of your ‘no-sidebar’ template, and if possible, provide a link to one of the pages based on that template.
Thread Starter
cejl
(@cejl)
Thanks for your response… I’ve pasted the code below… unfortunately, can’t share the page, since I have it maintenance mode (making a site for someone)
<?php
/*
Template Name: No-Sidebar Page Template
*/
get_header();
?>
<main id="site-main" class="site-main" role="main">
<?php if ( have_posts() ) : ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
/**
* Allow for changing the template partial.
*
* @since 1.2.3.
*
* @param string $type The default template type to use.
* @param WP_Post $post The post object for the current post.
*/
$template_type = apply_filters( 'make_template_content_page', 'page', $post );
get_template_part( 'partials/content', $template_type );
?>
<?php get_template_part( 'partials/content', 'comments' ); ?>
<?php endwhile; ?>
<?php endif; ?>
</main>
<?php get_footer(); ?>
the use of body_class() in your theme adds a cuatom page template specific CSS class, which depends on the used file name of your custom page template;
try and add this CSS either via a ‘custom CSS’ plugin, or to style.css of a child theme:
(example assumes file name to be no-sidebar-page.php)
.page-template-no-sidebar-page.has-right-sidebar .site-main, .page-template-no-sidebar-page.has-left-sidebar .site-main
{
width: 100%;
}
please post any further theme specific questions in https://ww.wp.xz.cn/support/theme/make
Thread Starter
cejl
(@cejl)
Thank you so, so much. This worked perfectly.