I'm wondering if it's possible to NOT have the sidebar in a Page. I have specific content I want to show, and the sidebar (with categories, calendar etc.) doesn't need to be there.
I'm wondering if it's possible to NOT have the sidebar in a Page. I have specific content I want to show, and the sidebar (with categories, calendar etc.) doesn't need to be there.
You can remove the call to the sidebar in your page or create a new page without the sidebar.
jonimueller is totally right. There should be a page.php file in your theme folder. Copy it then rename it to anything you remember and delete the sidebar call.
One you have done all the above the only thing you need to do is to apply this template in your "Write - Page" Section of your blog everywhere you want no sidebar.
Could look something like this:
<?php
/*
Template Name: Page Templage w/o Sidebar
*/
?>
<?php get_header(); ?>
<div id="content" class="fullcolumn">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<h2><?php the_title(); ?></h2>
<div class="entry">
<?php the_content('<p class="serif">Read the rest of this page »</p>'); ?>
<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
</div>
</div>
<?php endwhile; endif; ?>
</div>
<?php get_footer(); ?>Unless the call to your sidebar isn't in the page template. I've never put this in any of my themes. I've always called it in the footer.
You can always find the call for the sidebar which should be:
get_sidebar();
Then you could do this:
if(is_page('Page Name')) :
else :
get_sidebar();
endif;Hmm. My page template usually tracks my index.php template and most of the time I call the sidebar from index.php and then daisychain the footer, calling it in the sidebar. But that's just me, and I think that might be leftover thinking from (please don't laugh) Greymatter.
The best solution, tho, is what greenshady proposes. :)
The page template is a perfectly fine solution. I even offer it in one of my themes. The if statement is a little different though with that because I include the sidebar in the footer.
You must log in to post.