WordPress.org

Ready to get started?Download WordPress

Forums

Particular Random Image (5 posts)

  1. pmalerba
    Member
    Posted 9 years ago #

    Hi to everyone.
    I have just installed the last wp release and i found it very interesting.
    Now i'm trying to customize the "travelogue" theme found at http://www.managedtasks.com/wpthemes/blog/index.php?wptheme=Travelogue

    I would like to know how it's possible to realize a small script to generate a random image of the polaroid on the top left of the screen.
    I just want to prepare 5 or 6 "polaroid" changing every time that i refresh the page.

    Have you got any suggestion?

    Tnx

  2. RaynerApe
    Member
    Posted 9 years ago #

    It's fairly simple. Find someone who can code in PHP to make you a tiny <php> that pulls a random number between 1 and X and echoes it. Then find where the image is located in the template and change it with < img src="title-< ?php instertscripthere; ?>.jpg" > and you will get each time a title from title-1.jpg to title-X.jpg.

  3. jowra
    Member
    Posted 9 years ago #

    I'm using the Automatic Image Rotator on my Blog wich is really simple to use.

    http://automaticlabs.com/products/rotator

  4. Joshua Lyman
    Member
    Posted 9 years ago #

    Glad to know you're testing out the theme! Per your suggestion, I added support for that this morning. Go to http://www.podq.com/travelogue/ to download the newest version.

    It simply relies on using a randomized CSS class to pull an image, so you will need to create your images, edit the CSS file, and edit one line in the header.php file. Don't worry, detailed instructions are included in the readme and CSS files. ;-)

    Josh

  5. pmalerba
    Member
    Posted 9 years ago #

    Tnx for your consideration. Your suggestions were really helpful for me.
    And tnx to Josh for the new realease!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.