Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   Enabling sidebar for select pages (http://forum.bytesforall.com/showthread.php?t=1532)

guacamoly May 3, 2009 11:57 PM

Enabling sidebar for select pages
 
Hi, I've turned off the left sidebar for the majority of the site I'm building but there are a few pages where I would like to turn it on.
Is there a way for me to do this.
Thanks a lot.

guacamoly May 4, 2009 02:17 AM

my bad.. figured it out.
by the way.. and fyi: I have about 8 pages on my site and I wanted the left sidebar to appear only on one of them.
To have done thiis the provided way i would have had to type in the page id's of all 7 pages i don't want the sidebar on into the sidebar "do not include" config box.

i found an easier way .. i simply copied index.php and created a template for the page which would have the sidebar on. I went to the portion of code which figures out whether to enable the sidebars and commented it out.. (right after global $cols; global left_col; global $right_col;)
and simply typed in
$cols++; $left_col = "on";
$cols++; $right_col = "on";
turning on both sidebars.

i'm guessing this would make the page a little bit faster as well since it bypasses all the conditional logic.


All times are GMT -6. The time now is 04:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.