Support » Themes and Templates » full width pages

  • I would like to have some pages without a sidebar, some with. Unfortunately, I chose a theme that does not have this. So, I created a no-sidebar template, but the site content remains the same width as if there were a ghost sidebar. When I inspect the page with Chrome, the container is full width, but site content is a short width. I’ve been muddling with the CSS (in jetpack css editor) to change the width, but it doesn’t work…. is there something I can add to my new page template?

    (I’m using the free version of the Make theme.)


Viewing 4 replies - 1 through 4 (of 4 total)
  • please post the code of your ‘no-sidebar’ template, and if possible, provide a link to one of the pages based on that template.

    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)

    Template Name: No-Sidebar Page Template
    <main id="site-main" class="site-main" role="main">
    <?php if ( have_posts() ) : ?>
    	<?php while ( have_posts() ) : the_post(); ?>
    		 * 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; ?>
    <?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

    Thank you so, so much. This worked perfectly.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘full width pages’ is closed to new replies.