I got an problem. Guess i will need your help – and – excuse my bad english, I am not from an english speaking nation.
So , here I go:
I want to have 7 Banners, 1 for each day. Starting from Sunday to Saturday ;). But what to do? If it where php it would be no prob after all. But, the style itself is using a style sheet. Quote like this for the banner:
So, what to do? Hope anyone can help me out, it’s very important to me.
/edit: I am sorry ’bout that, but i messed up the Forum :|. It’ shouldn’t be here, would be nice if a mod or someone else can push it in the right one. Thanks and sorry /
“If it where php it would be no prob after all.”
Why not define the style for the header in your header.php?
Hm yes i thought about that, but:
I fear that it will nearly destroy anything else.
Beside that, i dont know where to place this in the header.php.
I use “FallenLeaves” style, just want to replace the headers daily.
Maybe you can say how to?
maybe this thread will shed some light on how to style.
You can do a banner.php instead of a banner.jpg, in which you check the day and do a 302 redirect. An example of this is http://photomatt.net/scripts/randomimage, but your script will be much simpler.
Well thx for the quick help.
But still i am very confused about what to do, and – i don’t know where to place this.
Maybe you can grab up my quote up there and edit it the way it should look like?
Sorry, but i am a beginner at this.
First, the method of doing is based upon an important question. Do you want a specific banner image for a specific Day of the Week (like it says “Thursday” on the Thursday banner), or are you just happy rotating your 7 banners randomly per day?
You are talking about changing the CSS when all that needs to be changed is the header image, right? Keep the banners about the same shape and size and the CSS will take care of itself. You just want to change the image. Please clarify this if it is wrong.
The random rotating script mentioned up above involve putting the images in their own folder along with the script. Instead of linking to an image, you link to the script like this:
<img src="/images/header/rotator.php" alt="blah" title="blah" />
Then the images in the /images/header/` folder would just randomly generate WITH EVERY PAGE VIEW. Not by date. I use it on my site – just click my name here and go to any post and then refresh the screen and you will see the photograph in the sidebar change.
There is a LOT more information on this in the article on WordPress headers at:
Your issue is the “by day” not by refresh. There are a TON of similar scripts at any of the following spots that will do what you want. You should be able to use them like the one mentioned above.
If the only change you are making is with the CSS, you have a different problem. But if the only change you want is with the graphic, then you use this information.
Yep it’ s just 1 banner per day. I guess i will try this out, looks like it can help me a lot 🙂
Thank you for your support.
Well.. still don’t work.
I guess because i dont know where to wrote this in “<img src=”/images/header/rotator.php” alt=”blah” title=”blah” />”.
It belongs in the style.css or? How must it look like?
Don’t work for me. I tried also <img…. banner1.jpg”> to test if the link is working, but still then i only get an empty header.
Someone can help ?
I’m using Chetan Kunteâ€™s “plain vanilla” theme and he explains how to set up a set of header/banner images for specific pages in the comments area of the theme at
The question is comment #76 and the answer is comment #77. You should be able to adapt this for whatever theme you’re using, etc.
If you decide you want to just rotate images at random and not associate them with a specific page, I use Dan Benjamin’s image rotator script that he wrote about at A List Apart:
I’ve got it in action on my website at http://www.sooz.com
Oops I missread your original question. I see you want something “by day” and not “by page.” Well, in case you change your mind, maybe this will be helpful or I’m sure it can be tweaked for something day specific … I’m just not enough of a geek to know how to do that.
/* Path to images */
$folder = 'http://example.com/wp-content/banners/days/';
/* Today's day */
$day = date('l');
/* Extension */
$ext = '.jpg';
/* Join them for file path */
$path = $folder . $day . $ext;
/* Go! */
So you’ll have Sunday.jpg, Monday.jpg, etc.
Save that code to a file called banner.php. Customize the path and extension.
banner.phpin your theme folder’s
In your css, change
Ok it working for me so far. But I got one last question left.
It is possible to extend this from Monday-Sunday.jpg to the Date 1st of month to 31th of month?
I know , i didnt asked this @ the beginning, but it woul be very helpful to know this for later usage maybe.
- The topic ‘7 days – 7 banners’ is closed to new replies.