Support » Fixing WordPress » Rotate the Header Image.

  • Mark (podz)


    Support Maven

    Found a script of Matt’s and it works a treat 🙂
    I did it like this:
    – Made a folder just for my header images
    – Uploaded the above file into that as ‘rotate.php’
    – Uploaded various headers (actually, they are the same just with different colour filters)
    – Changed my #header in wp-layout.css to read like this (part of it)
    #header {
    background-color: Black;
    background-image: url(headers/rotate.php);
    And bingo !
    Different header images.
    So thanks again Matt 🙂

Viewing 15 replies - 1 through 15 (of 30 total)
  • podz,
    Good tutorial…how about submitting it to the docs list? 😉

    Great! (if only I had some images 🙂 )
    Rotate conjured visions of rotating the same image by some degrees. Random is a better word for what the script does.

    Mark (podz)


    Support Maven

    NM – will do tomorrow
    2f .. agreed 🙂
    Though that’s waht Matt called it 😉

    He calls it random in the URL you gave, though. I guess the php files are called rotate because a people might have already a random.php to generate random quotes and stuff.

    For some reason this is not working on my site. I’m not sure if the site is recognizing the rotate.php file.
    I do as they say:
    path – rotate.php
    But for some reason no header is showing up. I decided to disable it until I can find out what is going on…
    By the way, I’m using Kubrick’s Template.


    Mark (podz)


    Support Maven

    Have you done exactly as above ?
    If nothing at all appears, the url value in the css could be wrong.

    Ok, I’ve tried to do it again without luck. First of all, I’m using Kubrick’s Template. On the index.php file it has a CSS with a #header info. I tried modifying that one and after I do I get no header at all, just a blank space.
    I noticed that you mentioned (now that I see it) modifying wp-layout.css, and I noticed as well that inside there are two #header, and one #headerimg. I tried modifying both #header without luck either.
    I also tried using rotate.php on the same directory that index.php is, and also in the same directory that headers folder is.

    I did the rotate images in my blog, but it seems that it gets stuck to one image when i refresh. I used the code from photomatt then made a folder and inside the folder are my images for the headers and the rotate.php file. I then went to the wp-layout.php and changed it to look like this:
    ‘#header {
    background: #FFF;
    background-color: White;
    background-image: url(headers/rotate.php);
    background-repeat: no-repeat;
    border-bottom: 0pxx #aba;
    border-left: solid 0px #9a9;
    border-right: solid 0px #565;
    border-top: solid 0px #000;
    letter-spacing: 0.0em;
    margin: 0;
    height: 86px;
    width: 387px;
    #header a {
    height: 100%;
    #header a:hover {
    text-decoration: underline;

    Mark (podz)


    Support Maven

    mi327 – url to your site ?

    Anyone had a problem with this actually rotating on a regular basis in Firefox?

    Nope, I tested the site I had using this script and it seems to work fine in both Firefox and IE. What exactly is the problem you’re having?

    i just tested out, it work for me…i change the path in the php file to work for me since i have the images locate where my theme is.

    this is how i have it in the css file:
    #header {
    background: #90A090;
    background-image: url(‘rotate.php’);
    background-repeat: no-repeat;
    border-bottom: dotted 1px #FFFFFF;
    border-left: dotted 1px #FFFFFF;
    border-right: dotted 1px #FFFFFF;
    border-top: dotted 1px #FFFFFF;
    font-size: 20px;
    height: 225px;
    margin: 0px;
    margin-top: 0px;
    text-align: center;
    width: 100%;

    change this part in the rotage.php to where you have your images locate…this how i have mine
    $folder = ‘images/objects/’;

    A List Apart has A Better Image Rotator using an .ini file.

    I’ve been setting up my blog, slowly it seems, with this way to rotate some images in the header. This way allows alt=,title=, anchors…

    Working with the latest nightly, on my laptop at home, it works beautifully. Just need to change some paths.

    A different method.

    I have random header images on Kubrick! I’m so happy! LOL

    I just edited the header.php file and threw the image folder and PhotoMatt’s script in a folder inside the /default theme folder

    I just grabbed a bunch of my motorcycle riding photos and cropped 760×200 pieces of them for my headers. Came out pretty dang good if I don’t say so myself!

    now if I can just figure out how to move the title to the right…. <:-0

Viewing 15 replies - 1 through 15 (of 30 total)
  • The topic ‘Rotate the Header Image.’ is closed to new replies.