Support » Fixing WordPress » Rotating Header Image Help, Please!

  • Hi, I have been using WordPress for a couple of months now. I used to do my HTML strictly in Notepad and then one day I had to help a friend out with a WordPress site and realized how simple it is to use that my thoughts of it being “cheating” quickly turned into “why have I been so arrogant all along?” lol…

    Anyway, I am running across a problem here that I can’t figure out because in my HTML prime, I never really messed with style.css sheets.

    I tried finding a solution first and came across this forum post, but that didn’t help (I’m thinking it’s because the #logo and other minor details, mostly because that gentleman’s stylesheet is different from mine. I have a variety of images I have made for the header at the top of the site and I would like to rotate them.

    I will post my style.css and header.php code and if someone could please tell me what to do, that would be amazing. If I am forgetting any details or you have any questions, please let me know!

    EDIT: The forums said the code was too long and to use, so the code is at the below links.


Viewing 12 replies - 1 through 12 (of 12 total)
  • Thank anyone and everyone in advance for even trying to help!

    There’s no need for you to post your entire header.php and style.css files. Nobody is going to read 700+ lines of code to try to solve this problem, but we can help without it 🙂

    When you say ” I have a variety of images I have made for the header at the top of the site and I would like to rotate them.” do you mean that you want them to change every so often while looking at the page or do you want to display a different image on each page load? (both are possible, the latter is easier)

    I’ve seen people post their whole code plenty of times when I’ve looked up help here and so I was just trying to be proactive, sorry. I was also doing it because the link to the solution I found seemed like it should work, but didn’t, and it may be because person that posted that forum thread had a #logo and didn’t have #header-wrapper, etc.

    But anyway, I want it to load a different image on each page load. I don’t want to run Flash or Java as I want the site to be simple, and it would require those or some other stuff to have them refresh based on an amount of time. Plus, I think that gets too flashy, lol.



    Forum Moderator

    esmi, I downloaded it and set it up, just changed the permissions and am looking at the settings, it is a rotation based on time. Is there a way to make it so it just changes the image based on page load?

    If you’re using a theme based on twentyeleven or twentyten you can upload your header images to /wp-content/themes/<your theme>/images/headers then log into wp-admin and go to Appearance > Headers select “Random” and save changes. It should load up all your headers and randomly select one at page load.

    esmi, I just finished setting it up and am looking at it, and I didn’t really want it to be rotating, but I could settle for that, at least for now…but my problem is (if you go to the web site you can see ( the image doesn’t go where I want it to, and I don’t know how to fix it and whether it needs to be fixed in the style.css or header.php — could you please look at the site and see how its appearing and then maybe briefly look at the coding at (style.css) and (header.php) and maybe give me an idea if you have one? Thanks, soooo much!

    I just looked at your code (good thing you posted it afterall :p ). For my suggestion to work, you’ll need to use <?php header_image(); ?> as the source of your image tag like this:

    <img src=”<?php header_image(); ?>”>

    hans, I guess I’m not, because when I go to Appearances, I don’t see a Headers tab 🙁

    You mean in the stylesheet?

    I can’t figure this out and the Cimy Header Image Rotator is cool, but it’s not exactly what I wanted (I prefer to have the image change per page load) but most importantly I can’t relocate it. I can’t figure out why I can’t get this stuff to go where I want it to.

    Probably because the header is set as a background and the code around it therefore is set for it as a background too? Maybe then when I keep trying to put the HTML in the place of the header’s current area it’s not working because it’s not technically currently a header, but a background image?

    [ Be patient and don’t bump. That’s not permitted here. ]

    I’ve definitely exhausted that plugin esmi. It only concluded by confusing me even more. Still can’t figure out why nothing seems to work.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Rotating Header Image Help, Please!’ is closed to new replies.