• Found a script of Matt’s and it works a treat πŸ™‚
    http://photomatt.net/scripts/randomimage
    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)
  • NuclearMoose

    (@nuclearmoose)

    podz,
    Good tutorial…how about submitting it to the docs list? πŸ˜‰

    carthik

    (@carthik)

    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.

    Thread Starter Mark (podz)

    (@podz)

    NM – will do tomorrow
    2f .. agreed πŸ™‚
    Though that’s waht Matt called it πŸ˜‰

    willm

    (@willm)

    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.

    *bump*
    πŸ˜‰

    Thread Starter Mark (podz)

    (@podz)

    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 {
    display:block;
    height: 100%;
    text-indent:-500em;
    text-decoration:none;
    }
    #header a:hover {
    text-decoration: underline;
    }

    Thread Starter Mark (podz)

    (@podz)

    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!

    http://damnablog.com

    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.