WordPress.org

Ready to get started?Download WordPress

Forums

Trouble making page template. Trying to remove sidebar(or one column). (3 posts)

  1. Adam W. Warner
    Member
    Posted 7 years ago #

    Hi all,

    I've made a new page template following the directions here. The reason for this is that I'm trying to remove the sidebar of my theme for this page only becaue my inline frame for my t-shirt store won't quite fit. I have commented out the sidebar in this new page template.

    I have added that template to my theme's directory. I then went to "write page" and selected my new template. However, the sidebar still shows. If I comment out the header, it disappears...if I comment out the footer, it disappears. I can't seem to accomplish what I want.

    Can anyone here offer any suggestions on how I might remove the sidebar(s) for this page only? Here's the page...

    http://oneeyedview.com/?page_id=18

  2. Adam W. Warner
    Member
    Posted 7 years ago #

    Here's what my new template page code looks like. Anyone offer any clues on how I might accomplish my goal?

    <?php
    /*
    Template Name: Spreadshirt
    */
    ?>
    <?php get_header(); ?>
    
    	<div id="postcolumn"> <!-- Begin postcolumn -->
    
        <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    		<div class="post">
    		<h2 id="post-<?php the_ID(); ?>"><?php the_title(); ?></h2>
    			<div class="entrytext">
    				<?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?>
    
    			<?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?>
    
    			</div>
    		</div>
    	 <?php endwhile; endif; ?>
    	<?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
    	</div> <!-- End postcolumn -->
    
    <?php get_sidebar(); ?>
    </div><!-- End Base -->
    <?php get_footer(); ?>
  3. wireless
    Member
    Posted 6 years ago #

    did you get it fixed awarner20?

Topic Closed

This topic has been closed to new replies.

About this Topic