WordPress.org

Ready to get started?Download WordPress

Forums

Random image per SESSION, not per reload (3 posts)

  1. mStudios
    Member
    Posted 9 years ago #

    Title says it all ;-)

    I've been using "Multiple Random Images" which I like a lot and it was easy to setup. But now I decided I want the image to change only 1x per user session, not on every load of a page. I've searched here and on Google but was not able to figure out how to go about this task, as all these random image scripts act on load of page and not on user session.

    I tried it with session_start(); and with if ($count > '1') { return; } in various variations. My problem is that I could not figure out how to incorporate this into the existing plugin, it either continued loading random images or no image at all (but showed the title of the banner image).

    Any help appreciated!

  2. mStudios
    Member
    Posted 9 years ago #

    Anyone versed in session cookies? I would love to apply this to the "Multiple Random Images" plugin (which now with it's option page has become even easier to use).

  3. Quicky
    Member
    Posted 9 years ago #

    I too would like to be able to add a random image to my blog that doesn't change at every reload but at a certain time interval.

    I'm actually looking to implement a '<<subject>> Picture of the Day' kind of thing. So I'd need something that changes the picture at random from a directory every day and so that it will show the same picture for every user...

    Any help would be greatly appreciated.

Topic Closed

This topic has been closed to new replies.

About this Topic