[SOLVED] Specific content in logo area for a category
I am almost able to do this myself, but I'm not sure of the PHP quite yet. Flynn, you helped me make the logo area into 3 table cells so I could put a logo image there plus an ad. I actually turned it into 2 cells.
Now I need to be able to have a different banner ad show in the right table cell just on a certain category. I know I'd do an "if is catgory ()" sort of statement, but I'm not sure where to put it in the header config file. My file right now has this in it: Code:
// END of title/description The obits page in action now shows a funeral home ad, the sponsor of the section, in the right sidebar, but I want to put a smaller version of it where the Sotheby's/Plates/Coughlin ads are now. http://larchmontgazette.com/wp27/category/obits/ |
PHP Code:
|
Ah. Getting closer. I should have been clearer, Flynn. Sorry.
I need separate code for Obituaries and Garden Guide. Each of these categories will have a different sponsor. So I need 3 instances of the Javascript banner ad code, for Obituaries, Garden Guide and the rest of the site. I'm unsure of how to arrange the 2 versions of the code, plus the site-wide code. Should it be this? Code:
// END of title/description |
Then use this:
PHP Code:
|
OK, closer!
However, now the correct ads show on the category main page, but not on individual posts in the category. Ignore the funeral home ad in the right sidebar. That was my work-around if I couldn't get the top ad to work. http://larchmontgazette.com/wp27/category/obits/ , great! But: http://larchmontgazette.com/wp27/200...ind-reigelman/ There must be some other bit of code missing, no? |
Try this:
PHP Code:
|
OK, that was the trick! Thank you so much, Flynn!
Why not make this an option in the theme options area? I would think many people would want to be able to use the logo area this way. Or have a separate ad banner spot up there, easily configurable for different sizes of logos and ads. The way I did it, with a TD spanning 2 columns for the logo and a TD for the ad works nicely. The refinement of letting the user show different ads in different categories is really super. Maybe the person wouldn't put ads up there, just different kinds of images for different parts of his site. Atahualpa is already so flexible, give us this added toy. Please? For my part, I fear that the person who will eventually take over my job will not be as willing to get into the core files as I have been, so making this easy is important. |
All times are GMT -6. The time now is 11:04 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.