• I want to create a page that shows two images equally.
    What I mean by this is, if I have two images displayed side by side, I want the images to swap places.
    Not sure how I can do this.
    Is there a way for the images to be displayed based on odd or even minutes of the day?
    So for example: Image 1 shows on the left side when loaded on odd minutes. Image two shows on the left side on even minutes?
    I’ve been searching on how this can be done with no luck.
    If that’s not an approach, can you point me in the right direction for doing this?
    The point is for half the viewers to see image 1 on the left side and the other half to see image 2 on the left side..
    Any help here would be greatly appreciated..

Viewing 1 replies (of 1 total)
  • Hello,

    If you can code here’s a PHP function that detects if the minute is odd or even and prints some text to show what you want is possible. You could potentially convert this to a shortcode and wrap it around your content specifying what to show:

    $number = date('i');
    if ($number % 2 == 0) {
        print "It's even";
    } else {
        print "It's Odd";
    }

    This does however, lead to question what you’re trying to achieve and is this the best way to go about it? What about users who stay on the page longer than a minute? Would the image change dynamically while they look at the page or only on refresh?

    If you’re doing AB testing to see which images get more reaction from the user there are better ways of doing so.

    ~ Steven

Viewing 1 replies (of 1 total)

The topic ‘Dynamic Images on page.’ is closed to new replies.