Support » Plugins » Hacks » Random Image

  • Hi
    I have just discovered the wonderful WordPress and am just trying to get my head around how things work. Thought first project would be to try and move over my existing site and learn as we go along.
    On my existing site I have a folder with 50 random images in it which gets displayed near the top on every page, I use a simple javascript to do this i.e.

    <script type=”text/javascript”>
    var pictures = 50;
    var dt = new Date();
    var hr = dt.getSeconds();
    var ra = hr % pictures;
    var re = ++ra;
    var msg=”<IMG SRC=images/”+re+”.jpg>”;

    I thought it may be just a case of placing this in the header.php file within my theme but no 🙁
    not as simple as that.
    Is there a simple way of adapting this to work?

    Many thanks

Viewing 13 replies - 1 through 13 (of 13 total)
Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Random Image’ is closed to new replies.