WordPress.org

Ready to get started?Download WordPress

Forums

Custom Page Theme w/no sidebar (2 posts)

  1. taxiecabbie
    Member
    Posted 2 years ago #

    Okay, so I just updated my page and... with a slip of my finger I accidentally deleted the custom pages I had made that removed the sidebar to make full-width pages. Oops.

    So I looked it up and see that you need copy the page.php and do some customization to the php to remove the sidebar. I did so, and this is what the custom code looks like:

    <?php /*
    	Template Name: No sidebar page
    */ ?>
    
    <?php get_header(); ?>
    
        <div id="content" class="col-full">
    		<div id="main" class="col-left box">
    
    			<?php if ( function_exists('yoast_breadcrumb') ) { yoast_breadcrumb('<div id="breadcrumb"><p>','</p></div>'); } ?>
    
                <?php if (have_posts()) : $count = 0; ?>
                <?php while (have_posts()) : the_post(); $count++; ?>
    
                    <div <?php post_class(); ?>>
    
                        <h1 class="title"><?php the_title(); ?></h1>
    
                        <div class="entry">
    	                	<?php the_content(); ?>
    	               	</div><!-- /.entry -->
    
                    </div><!-- /.post -->
    
    				<?php endif; ?>
    
    			<?php endwhile; else: ?>
    				<div class="post">
                    	<p><?php _e('Sorry, no posts matched your criteria.', 'woothemes') ?></p>
                    </div><!-- /.post -->
                <?php endif; ?>  
    
        </div><!-- /#content -->
    
    <?php get_footer(); ?>

    I have uploaded it via FTP and am able to access the new page template through the dropdown menu. However, it still looks like this: http://contentequalsmoney.com/who-we-are/

    I have referenced other posts but cannot figure this out. I will be very very grateful for somebody who can tell me what I am doing wrong. Thank you!

  2. ryafre1
    Member
    Posted 1 year ago #

    did you resolve this problem? I am looking for help with this exact issue.

Topic Closed

This topic has been closed to new replies.

About this Topic