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)
-   -   [SOLVED] I need a page template with no sidebars. (http://forum.bytesforall.com/showthread.php?t=8716)

Tesha Aug 5, 2010 09:46 AM

[SOLVED] I need a page template with no sidebars.
 
I know we can define which pages get excluded, but this site will be used by admin folks who I would not like going into the config area - if you know what I mean....

Anyway, the index.php is easy enough to add things to, but to remove something that's buried in the bfa_get_options like the sidebar info is just not do-able, at least for me.

Is it possible to add an "exclude" line to this line from the index.php

<?php /* get all options: */
include (TEMPLATEPATH . '/functions/bfa_get_options.php');
get_header(); ?>


that will make the new template appear to have been listed as excluded in the Options area?

thanks,

juggledad Aug 5, 2010 03:15 PM

why not just exclude the page in the option at ato->Style & configure SIDEBARS

Tesha Aug 6, 2010 01:25 PM

So many pages are now being listed on the no-sidebar areas...

So it's getting messy, and the admin folks for this non-profit change often.
Training is going to be an issue and I'd like to keep the folks away from that big red button at the bottom of every settings page.

Know what I mean?

juggledad Aug 6, 2010 01:54 PM

ok, here is what you do. Make a copy of index.php and call it nosidebar.php
edit nosidebar.php and replace lines 1-5 with the following:
HTML Code:

<?php
/*
Template Name: nosidebar
*/
 ?>

<?php // Do not delete these lines ?>
<?php        /* get all options: */
# error_reporting(-1);
include (TEMPLATEPATH . '/functions/bfa_get_options.php');
global $bfa_ata;

$left_col ="off";
$left_col2 = "off";
$right_col2 = "off";
$right_col = "off";
       
get_header(); ?>

save it and put it in the atahualpa theme folder (the folder that index.php is in)
Use the template on the page you want.

You could easily chang OFF to ON for any of the sidebars and create other templates as needed.

Tesha Aug 9, 2010 06:45 AM

You ROCK JuggleDad - you are the BEST ever...

Not only did you give us a working "no sidebar" page, but you even included the name it would use and the option to make further pages with other mixed options.

My non-profit thanks you - with another contribution as soon as the funding comes through!


Thank you - thank you - thank you!


All times are GMT -6. The time now is 12:32 PM.

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