Exclude sidebar on certain pages


Author Message
Philippe

Posted: 7/22/2009
Quote message 

Is there a way to exclude the widget on certain pages ?
 
Bob

Posted: 7/22/2009
Quote message 

Yes. It has nothing to do with creating your theme with Artisteer though. You would have to make a different page template that calls a different sidebar. So you would have to copy and rename your sidebar1.php or sidebar 2 whatever your theme has and then do some code changes in your new sidebar to display whatever you want to display. Creating a page template is done the same way. Copy, rename page.php, re-upload and add a little code to the top of the file to tell WP its a page template. Its easy as long as you know what your doing. There are quite a few tutorials around on making templates and its been talked about here in the forums you can even search here for more.
 
Garry

Posted: 7/22/2009
Quote message 

You should copy all code from page.php create a new file name it any of your choice, add below given code on top of it, upload that file into your theme folder and your new template will be available to you to choose from a drop down list when you add new page or edit existing page. You can change this template's structure to your needs; you need to assign a new name to your sidebar and you’ll be able to add desired widgets to this sidebar from widgets page. Now you should use this page template on pages where you need different set of widgets

<?php
/*
Template Name: new template
*/
?>

 
Brett Bumeter

Posted: 9/1/2009
Quote message 

An easy way to do this is to copy the page.php file, duplicate it essentially and name it something different.

Then put the code Garry references above

<?php
/*
Template Name: new template
*/
?>

Find the line that references the sidebar you want to exclude, and delete it.



 
Sandy

Posted: 9/13/2009
Quote message 

Hi,

I use a plugin called Widget Context and it's great. You can decide what widegets to have on what page if any. Very flexible.