Title: Installing a rotating script in header.php help
Last modified: August 18, 2016

---

# Installing a rotating script in header.php help

 *  [ellencbraun](https://wordpress.org/support/users/ellencbraun/)
 * (@ellencbraun)
 * [19 years, 10 months ago](https://wordpress.org/support/topic/installing-a-rotating-script-in-headerphp-help/)
 * Would you offer paid support to help me get a script running on my WP site?
 * I had a programming guy help me install a script, however he said it seems to
   only work well on regular html pages, WP would require something else that he
   did not know- so I’m turning to you for help.
 * I want to use this script: [http://automaticlabs.com/products/rotator](http://automaticlabs.com/products/rotator)(
   or a similar script that produces the same results) in the header.php of my wordpress
   site, so that the images above my adsense code rotate, you can see here- [http://www.raisingsmallsouls.com](http://www.raisingsmallsouls.com).
   I installed it, however not sure I did it right (It’s not working, lol!)
 * Can you point me in the right direction?
 * Thank you very much:)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [19 years, 10 months ago](https://wordpress.org/support/topic/installing-a-rotating-script-in-headerphp-help/#post-393428)
 * I’ll give you free support. 🙂
 * That script works, it’s just a matter of how you use it. In your case, you aren’t
   actually using it because those images are not linked to it.
 * However, since you’re wanting it to rotate four different images, presumably 
   from the same place, then that script might not be the best way to go anyway.
   The most likely scenario is that you see four copies of the same image. You probably
   want to pick 4 different random images from some set of X images and display 
   those, right?
 * Really, you need to define what you want it to do precisely and then somebody
   can create a simple script to do that for you. Predefined scripts like this are
   great if they fit your needs, but when they don’t, it’s better to define your
   needs more precisely instead.
 *  Thread Starter [ellencbraun](https://wordpress.org/support/users/ellencbraun/)
 * (@ellencbraun)
 * [19 years, 10 months ago](https://wordpress.org/support/topic/installing-a-rotating-script-in-headerphp-help/#post-393436)
 * Thanks, Otto:)
 * I actually have a folder called img with several pictures, and I want to rotate
   so that a user sees a random set of 4 pictures, not the same 4 all the time, 
   as I have it right now.
 * Sorry that I wasn’t clear!
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [19 years, 10 months ago](https://wordpress.org/support/topic/installing-a-rotating-script-in-headerphp-help/#post-393437)
 * Yeah, but I was wanting a bit more definition than that. But that’s okay, we’ll
   try it another way. 🙂
 * The way that rotator script works that you linked to above works is that you 
   edit the script to specify where this “img” directory is. Then you call it from
   your html like this:
    `<img src='http://example.com/path/rotate.php'>` or something
   similar. Basically you would replace the images you already have in your header
   now with that. When the browser goes to get the image, the rotate script pulls
   one at random and send it back.
 * Go ahead and see if you can get it to work that way. I don’t think it will be
   quite what you want, but that’s how you’d make it actually work. 🙂
 *  [peiqinglong](https://wordpress.org/support/users/peiqinglong/)
 * (@peiqinglong)
 * [19 years, 10 months ago](https://wordpress.org/support/topic/installing-a-rotating-script-in-headerphp-help/#post-393439)
 * Basically that is what I use on about all my sites, the random.php that rotates
   a banner. I actually stuck the code into my CSS file as such:
 * #header {
    margin: 5px auto 5px; padding: 0; background: #fff url(“[http://www.bui4ever.com/wp-content/themes/bui4ever_v15/img/headers/rotate.php&#8221](http://www.bui4ever.com/wp-content/themes/bui4ever_v15/img/headers/rotate.php&#8221);)
   no-repeat bottom; width: 760px; height: 143px; border: 2px solid #000; }
 * and that produced my random rotating banner here: [http://www.bui4ever.com](http://www.bui4ever.com)

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Installing a rotating script in header.php help’ is closed to new replies.

## Tags

 * [installing](https://wordpress.org/support/topic-tag/installing/)
 * [rotating](https://wordpress.org/support/topic-tag/rotating/)
 * [script](https://wordpress.org/support/topic-tag/script/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [peiqinglong](https://wordpress.org/support/users/peiqinglong/)
 * Last activity: [19 years, 10 months ago](https://wordpress.org/support/topic/installing-a-rotating-script-in-headerphp-help/#post-393439)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
