Hi Guys,
On some pages I need to completely remove the sidebar and use the entire width for page content.
What's the best and easiest way to approach this?
Cheers,
Hi Guys,
On some pages I need to completely remove the sidebar and use the entire width for page content.
What's the best and easiest way to approach this?
Cheers,
How you accomplish this really depends on which theme you are using, and your website specifically. Can you provide that information?
I need to know the same, my site is shoottothrill.co.uk if you could help that would be great!
You need to make a Page Template that only has one column. This should be pretty simple to do.
Make a copy of page.php, and rename it onecolumn.php, then open onecolumn.php in your favorite text editor.
Add this code to the very top:
<?php
/*
Template Name: One Column
*/
?>
Then take this line:
<div id="content">
And replace it with:
<div id="content" style="width:975px; padding-right:0px; border-right:0px;">
Finally, remove this code from the onecolumn.php file:
<div id="sidebar">
<?php include(TEMPLATEPATH."/l_sidebar.php");?>
<?php include(TEMPLATEPATH."/r_sidebar.php");?>
</div>
Then you just need to upload it to your theme, and choose that template on the pages you want to only have one column.
Got everything working, a huge thanks for that!
No problem Doc, I'm glad that it worked out for you!
jleuze: That's great advice. Appreciate your time and support!
It's good to hear that it worked on your theme too, 22!
What if the theme does not have the code
<div id="sidebar">
<?php include(TEMPLATEPATH."/l_sidebar.php");?>
<?php include(TEMPLATEPATH."/r_sidebar.php");?>
</div>
in the page template? I am using the "inove" theme.
This topic has been closed to new replies.