You can use the WordPress conditional tags to exclude the sidebar.
<?php
if ( !is_page(27) ) {
// Do all the sidebar stuff
}
?>
That code would put the sidebar only on pages that are not page 27.
And for changing the width – learn how to re-design the theme or some of the templates.
Would you put the tag in sidebar.php? As for the width issue, check out my stylesheet excerpt below. Can I add something there that will change the style of only one page or where I can call that particular code in one page? Or, what do you think? I am rather new at this, so if you point me in the right direction, I can probably work it out.
Thanks again.
/* content
————————————————–*/
#content {padding:20px 20px 20px 25px; float:left; position:relative; display:block; width:440px;}
#content ul, #content li {/*list-style:none;*/}
/* .singlecol #content {float:none; width:550px; margin:0 70px;} */
#commentspopup #content {float:none; padding-top:0;}
You don’t need that code supplied above… but you should create a Page Template for that Page of yours (the process is described in details in the Codex) and use the singlecol in it > I hope you can see it is much wider…
Reading: http://codex.wordpress.org/Pages
Check this page out now:
http://constitutionpercussion.org/?page_id=40
If you view it in Firefox, it looks fine. This is where I got to before. But, when you view it in I.E. it still thinks there is a sidebar there.
My footer calls the sidebar, so I simply made it where it didn’t call the footer. Instead, the footer page code is at the bottom of the template.
Here’s what I did:
<?php
/*
Template Name: Test Page
*/
?><?php get_header(); ?>
<!– content …………………………… –>
<div id=”content” class=singlecol”>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<!–
<?php wp_list_pages(‘exclude=100’); ?>
–>
<h2><?php the_title(); ?></h2>
<?php the_content(); ?>
<?php endwhile; ?>
Any thoughts?
<?php endif; ?>
</div> <!– /content –>
<!– footer …………………………… –>
<div id=”footer”>
© Copyright <?php echo date(“Y”).” “; bloginfo(‘name’); ?>.com :: All Rights Reserved ::
<?php wp_loginout(); ?>
<?php do_action(‘wp_footer’); ?>
</div> <!– /footer –>
You’re right, it does have some issues according to that site. Thanks for the tip there. I will definitely use it more.
One more question though and I will leave you alone.
Somewhere in my site, there is a place where the sidebar is reserved a slot whether it is called or not. If you open I.E. you can definitely see what I am talking about and compare it to Firefox or Safari which views it correctly.
Any thoughts…
http://constitutionpercussion.org/?page_id=40
For some reason the singlecol width is commented out in the stylesheet.
Yea, I tried to uncomment it before and it basically jacks-up the rest of the site. Check it out and you’ll see what I am talking about.
http://www.constitutionpercussion.org
I am in the learning process of PHP and can work around most things, but the stylesheet is unfamiliar grounds to me. I wish I could just add a line in the stylesheet and call it in a template, but I am not sure how yet.
In the template above replace this line
<div id="content" class=singlecol">
with whatever id and/or class you want and define its width and other properties in the CSS file.
BTW, it should be
<div id="content" class="singlecol"> – with quote before singlecol!