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)
-   -   Can I eliminate the right-hand sidebar(s) entirely on Pages but not on Home page? (http://forum.bytesforall.com/showthread.php?t=4557)

lansingonline Nov 22, 2009 01:17 PM

Can I eliminate the right-hand sidebar(s) entirely on Pages but not on Home page?
 
I have found some info that comes close, but I want to eliminate the right-hand sidebar(s) altogether on Pages but not the Home page.

Doable? If so, how?

Thanks -

Bonnie B

lmilesw Nov 22, 2009 03:09 PM

Just select only the Hompage in the appropriate places in the "Style and configure sidebars" section.

juggledad Nov 22, 2009 06:44 PM

ATO->Style & configure SIDEBARS->RIGHT sidebar: Display on: and RIGHT INNER sidebar: Display on:

If you only want to eliminate them on some pages, get teh page ID and put it in the 'RIGHT sidebar: Don't display on Pages:' and 'RIGHT INNER sidebar: Don't display on Pages:' options

paulae Nov 24, 2009 07:18 PM

This is a bit different kind of question:

I need to have a single post with no sidebars. There is no way in the ATA Options to do this, that I can see. I think the functions.php would have to be modified, but I'm not sure how to do it. Just do some kind of "if is" statement?

juggledad Nov 25, 2009 06:09 AM

when you say 'single post' are you displaying that on a single page? because you could exclude that page. Or do you want the sidebare when the post is on a multi post page and if someone clicks on it, then you don't want the sidebars showing, but only on that post?

paulae Nov 25, 2009 06:11 AM

Not a Page, a post. It's a post in the history category where we want to put some old content that's very wide and overflows the sidebars, so I want no sidebars on just that post, and not on the history category itself. So none of the theme options in the sidebar config area will help.

juggledad Nov 25, 2009 06:32 AM

Quote:

some old content that's very wide and overflows the sidebars,
now I'm really confused and curious. What type of content? Text? Images?

paulae Nov 25, 2009 06:45 AM

http://www.larchmontgazette.com/hist...-breaks-loose/
This is what we did last night to get the story out there before we knock off to do our Thanksgiving cooking. We wanted to reproduce the layout of our pre-Wordpress HTML page, with a wide extra left column with other links to the 1922 paper. We left that off so we could sort of fit this into the ATA center column.

juggledad Nov 25, 2009 07:26 AM

paula, edit bfa_get_options.php and go to line 193 (version 3.4.4) which should be
HTML Code:

// Put the sidebar results into our global options variable in case we need it somewhere else:
add the following just before it
HTML Code:

if ($bfa_ata['current_page_id'] == '8941') {
        $left_col = "off"; $cols--;
        $right_col = "off"; $cols--;
                }

that will shut off the sidebars just for that post

paulae Nov 25, 2009 08:01 AM

That worked! Thank you! Now we'll fill in the newly freed-up space with the other content we wanted. Super!

paulae Nov 25, 2009 08:28 AM

I spoke too soon. It did work, but the code seems to have disrupted something else. This is the email I just got from my partner:

Quote:

Warning: Cannot modify header information - headers already sent by (output started at /usr/home/web/users/a0018537/html/wp27/wp-content/themes/atahualpa344/functions/bfa_get_options.php:1) in /usr/home/web/users/a0018537/html/wp27/wp-admin/async-upload.php on line 24
8976

I'm getting this when I try to change the image on our Advertise page. There is an error with the banner illustration - our new banner is 760 x 60 (NOT 120 ) It let me change the text, but not the image.

juggledad Nov 25, 2009 08:42 AM

I'm not sure if this will help, but I realized it is 'better' code than I gave you originally. try this instead
HTML Code:

if ($bfa_ata['current_page_id'] == '8941') {
        if ($left_col == "on") { $left_col = "off"; $cols--; }
        if ($left_col2 == "on") { $left_col2 = "off"; $cols--; }
        if ($right_col == "on") { $right_col = "off"; $cols--; }
        if ($right_col2 == "on") { $right_col2 = "off"; $cols--; }
                }

Make sure the module doesn' have any invisable or blanks at the ent - like an extra line or two

paulae Nov 25, 2009 11:54 AM

Well, I tried that and got the same error when I tried to delete another post. Then I removed any of your new code, and got the same error again. I've now uploaded a fresh copy of that file, and all is well again. I dunno....

juggledad Nov 25, 2009 12:42 PM

In that case, something odd is happening with your editor. What are you using to edit the module?

paulae Nov 25, 2009 01:15 PM

I use Filezilla to FTP and Textwrangler for editing. I wonder if the settings in TW somehow got messed up? It's set for Unix.

juggledad Nov 25, 2009 01:26 PM

if your talking about the 'translate line breaks' I've got mine set to Unix (LF)

One thing I have run into a number of times is if I copy from a post on the forum and paste it into my code, some invisible characteres get copied. If you set Textwrangler to show invisibles, I'll see some black dots where it looks like spaces should be. I delete teh black dots and enter a space.

But that generally causes a t-string error...


All times are GMT -6. The time now is 12:54 AM.

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