Need my ‘No Sidebar’ Template to be full-width

I have removed the call for the sidebar in all the page types I’d like (leaving it in the post.php as desired, and have a WordPress template for the no-sidebar pages, like so:

get_header(); ?>

<div id="primary" class="content-area">
    <main id="main" class="site-main" role="main">

        <?php while ( have_posts() ) : the_post(); ?>

            <?php get_template_part( 'template-parts/content', 'page' ); ?>

                // If comments are open or we have at least one comment, load up the comment template.
                if ( comments_open() || get_comments_number() ) :

        <?php endwhile; // End of the loop. ?>

    </main><!-- #main -->
</div><!-- #primary -->
<?php get_footer(); ?>

but cannot make it full-width. Tried this in CSS:

.page-template-nosidebar-page-php .entry-header,
.page-template-nosidebar-page-php .entry-content,
.page-template-nosidebar-page-php .entry-summary,
.page-template-nosidebar-page-php .entry-meta
  padding-right: 0;

Can anyone tell where I am going wrong?

Read more here: Need my ‘No Sidebar’ Template to be full-width

Leave a Reply

Your email address will not be published. Required fields are marked *