• Is there a plugin that will show a random photo in my sidebar? Any photo that has been uploaded to my blog, I mean.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter jmeeter

    (@jmeeter)

    Bump.

    theMezz

    (@themezz)

    I am looking for a way to put a random image in the header. Anyone???

    fwdrew

    (@fwdrew)

    @theMezz-This post is a little dated but oh well ??

    A quick google search brought these two up, give them a look:
    Plugin 1
    Plugin 2

    This could also be done pretty quickly if your comfortable placing some php in your sidebar. A super quick example, not tested:

    <?php
       $randomNumberAd=rand(1,15);
       if($randomNumberAd <=5 ){
       $randomAdUrl = '<img src="path/to/your/image1" alt="Img 1" />';
       }
       elseif($randomNumberAd >= 10) {
        $randomAdUrl = '<img src="path/to/your/image2" alt="Img 2" />';
       }
       else {
       $randomAdUrl = '<img src="path/to/your/image3" alt="Img 3" />';
       }
       ?>
    <!--Usage Below-->
    <div class='yourAdClass'><?php echo $randomAdUrl; ?></div>

    Best Regards,

    Drew

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