[SOLVED] Change footer background on "Page" pages only
Hi Guys,
Just swapped my site over from an old static dinosaur to your Atahualpa theme. Been a great experience setting it up, but i have one little prob i can't seem to track down the answer to. I've added a background color to the footer, but would like it to not show on the "Page" pages....just posts and all other areas. Anyway to do it? Here's a post with the footer background that works good for me because it meets up with the side columns to box things in. Ex: http://www.makemethinner.com ....but on pages i'd like to have the footer background removed so the green body background continues down the pages. Ex: http://makemethinner.com/contact-us/ Thanks for taking a look....:) Tim (edited link -OP) |
Give this a try,
You should be able to do this with a CSS insert HTML Code:
body#body-page-150 td#footer { |
Quote:
Any way to code it with an "if" statement....i'm not familiar with coding but something like: :if "page" page then :remove footer background? That way I wouldn't have to enter every new page in css i create. Thanks again a million for your response JD. All the best, Tim |
So let me see if I have this right.
On the front page of the site, you want the footer background color removed and the credits to display. The credits will display on the body background color. On all the other pages, you want the chosen footer background color to overlay the body background color and the credits to display Is that right? |
Quote:
Thanks so much for your help with this. I think you may have it backwards or may not understand how i've got wordpress set up. I've got WP installed in my root, so the the landing page or "Home" page is actually a "post" page. For this and all other "post" pages I want to change "just" the footer background to a solid color from the body background. This is done through the theme footer options and works fine. you can see an example of this at the root landing page/"post" here. Landing "post" Page This boxes in the content in the body with the side columns with the same color. See how the side columns and the footer box in the body content are the same salmon color? The only time i want to alter this look is when i create a new "Page" with wordpress. In the case of new pages I have the side menus removed so i dont want to have any color in the footer box background. You can see an example of this here: Single Page "page" with your css mod This is one of the pages I altered with your code suggestion. See how the body background continues down the entire page? That's the look i want, but I also want to display the footer credits "without" any footer background color change, so the the green body background continues down the entire page, just as it looks there now. I removed your code on this page: Page "page" without your css mod See how the theme footer change shows, the salmon colored background in the footer box? I want to remove the salmon colored background in the footer box on the "page" Pages only, but leave the footer credits still showing. So, in essence, the only time i want to make an alteration would look something like this: If a new post is a "page" Page...then footer background would be null (allowing the main body background to run to the bottom of the page) This would still display the footer, but without the salmon colored footer background. Hope this makes things clearer and I haven't made things more confusing....:) Thanks again, Tim |
Ok, I think I've got it, so now we do some reverse thinking.
Set the footer color to the color you want on all the 'non-blog' pages - in this case it would be the green you want. Now use the following to set the color for the blog pages HTML Code:
body#body-homepage td#footer { HTML Code:
body#body-frontpage td#footer { |
Quote:
Your last post is doing exactly what i want to do. Only prob is, i dont want to have to make a css entry every time someone adds a "new page" to the blog. Here's an example of the code i'm using: HTML Code:
body#body-page-16 td#footer { Hopefully that would include "all" pages to remove the background in the footer area, and not affect the "post" pages? That is, if the entry is entered as a new "page" the footer background would be removed. If the entry is entered as a new "post" the footer background would follow the theme code. (ie: solid salmon colored footer background.) Thanks so much for your time...:) Tim |
But you shouldn't have to make a new entry. What you are doing is saying 'all pages will have a green footer'. Then your adding an exception with the two css entries saying 'change the "blog" pages so they have a footer that is yellow',
ThE two CSS bits of code only effects the blog (your front/home page) and the subsiquent blog or 'posts' pages. If you add a new page called 'foo' it will end up with a green footer because it's not one of the 'posts' pages (that are the home page and it's folowing pages.) so you should remove the HTML Code:
body#body-page-150 td#footer { |
Quote:
I changed things according to your last instructions and it works perfect except in reverse. I'd like it swapped the other way around, so the "page" footer pages have no background and the "post" page footers have the solid colored background. HTML Code:
body#body-homepage td#footer { We'll get it, Tim PS: Sent you a little donation. |
oh, did you try swapping the color codes? put the one that is inthe footer, in the CSS and the one in the CSS into the footer.
Thanks for the donation |
Hi JD,
Ok...i've been fiddling around again with this, and I'll fill you in with some new experimenting. I removed the footer background-color entirely from the Atahualpa Theme Options so that wouldn't be influencing things at all. When i place your code: HTML Code:
body#body-frontpage td#footer { (and nowhere else) When I add this: HTML Code:
body#body-homepage td#footer { Does this give you any clues? Tks again, Tim |
First off, you shouldn't be putting the code in style.css, this code should go in ATO->HTML/CSS Inserts->CSS Inserts This way, if you upgrade to a new release, you won't have to go into teh new stle.css and make the changes again. Sorry, I just look backed thru the posts and realized I didn't say to put the code there.
Second, can we work with some of the actual names of of the pages. For instance, the 'contact us' page is correct as is 'Home' (the page called Home) and teh page 'Directory' those are all good. The pages that need to be fixed are the page that gets linked to when you select 'Medfast' or 'Home Office' am I right? |
yep...all the "pages" (catagories) that are on the upper blue menu and those sub menus, and all individual posts, i would like to have the yellowish background in the footer box, the same color as the side columns backgrounds. (#FFF8C6)
SEE ALL OUR TWEETS-MEDIFAST-NEWSLETTERS-TSFL-CAREER-HEALTH-TRAVEL-VIDEOS Only the "page" pages on the lower green menu that were created by "New Page", i'd like to have no background color in the footer. DIRECTORY-HOME-CONTACT US So in essence, if there's code that identifies if the page is a "Page"...(created by "new page")...then no background in footer box. That would leave all else with the footer background, which is what i'd like. Thanks again, Tim edit--- right now i have this in the css inserts box: HTML Code:
body#body-frontpage td#footer { HTML Code:
background-color: none; |
sorry...i've been playing around again.
now i have: css inserts: HTML Code:
body#body-frontpage td#footer { HTML Code:
background-color: #FFF8C6; |
Ok, I think I making progress. The issue is coming up with the common identify of the pages. tis may be it. Replace the other entires in the CSS Insert with:
HTML Code:
body#body-homepage td#footer { HTML Code:
background-color: none; The Category pages and any archive pages. See if it works |
BINGO!
That got everything but the front page (root) I added the frontpage code and we got it. This is what i ended up with: css insert HTML Code:
body#body-homepage td#footer { HTML Code:
background-color: none; Tim |
poop....i'm back.
After further navigation, I found that the individual posts dont have the footer background color. ex:
Tim |
the only way to uniquely identify the single past pages is to make a coding change. You will need to edit bfa_bodyclasses.php and change line 26 from
HTML Code:
$body_id = "body-post-" . $post->ID; $body_classes .=" body-post"; HTML Code:
$body_id = "body-post-" . $post->ID; $body_classes .=" body-post mmtsingle"; HTML Code:
. mmtsingle td#footer { Remember that this will have to be fixed on each new Release of Atahualpa because this is a code change. |
Quote:
Tim |
WP-Content/Atahualpa333/functions/
It's code that is part of the Atahualpa theme. You may have to download it from the HOST, change the code and reupload it to your site's host. |
Quote:
I'm still on 3.3.2. I guess i need to upgrade to 3.3.3 to have that file? Think i'll hold off for now and live with what i have. Thanks for all your help. Tim |
in 3.3.2 see line 849-850 of functions.php
|
Quote:
I had to reverse the order and add the css insert first tho. I entered the function file first and got locked out of everything and had to upload a fresh function file via ftp to gain access. Thanks a million.... Tim |
All times are GMT -6. The time now is 01:51 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.