WordPress.org

Forums

Toothpaste
[resolved] Page without sidebars? (5 posts)

  1. carrierawks
    Member
    Posted 2 years ago #

    Is there a way to make a page without sidebars? Thank you.

  2. Matthew
    Member
    Posted 2 years ago #

    Just one page or the entire website?

  3. carrierawks
    Member
    Posted 2 years ago #

    Okay I went ahead and meddled with it and made a template. So if anyone is looking this is how I did it.

    Created a file called noside.php

    <?php
    /*
    Template Name: noside
    */
    
    get_header(); ?>
    
    <div id="primarynoside" class="content-area">
    	<div id="content" class="site-content" role="main">
    
    		<?php while ( have_posts() ) : the_post(); ?>
    
    			<?php get_template_part( 'content', 'page-noside' ); ?>
    
    			<?php if ( comments_open() || '0' != get_comments_number() ) : ?>
    				<div id="single-comments-wrapper">
    					<?php comments_template( '', true ); ?>
    				</div><!-- #single-comments-wrapper -->
    			<?php endif; ?>
    
    		<?php endwhile; // end of the loop. ?>
    
    	</div><!-- #content .site-content -->
    </div><!-- #primary .content-area -->
    
    <?php get_footer(); ?>

    Then made this change to the style.css file.

    #primarynoside {
    	width: 100%;
    
    	-ms-box-sizing: border-box;
    	-moz-box-sizing: border-box;
    	-webkit-box-sizing: border-box;
    	box-sizing: border-box;
    	float: left;
    	padding-right: 35px;
    }

    So far I see no issues. Just thought I would show an example. :-)

  4. Greg Priday
    Member
    Theme Author

    Posted 2 years ago #

    Toothpaste has a built in template without sidebars, but I just noticed a small issue in the CSS that's preventing it from working properly. I'll update it in the next version. Sorry about that!

    Glad you found a solution in the mean time.

  5. carrierawks
    Member
    Posted 2 years ago #

    Ah okay. I know a lot of themes usually have an option for it. So that is good to know. :-)

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic