WordPress.org

Ready to get started?Download WordPress

Forums

Alternate (3 posts)

  1. carnold
    Member
    Posted 6 years ago #

    I am using WP 2.1.3 and i would like to have alternating header pictures on my home page. I have the images i would like to have "alternate". How do i accomplish this? Thanks

  2. macsoft3
    Member
    Posted 6 years ago #

    Use GIF animation to create an imagae and swap it for wp-content/themes/default/images/kubrickheader.jpg, for example.

    Tom Bluewater
    MacHouse

  3. talie2
    Member
    Posted 6 years ago #

    or name your images image1 through image9 or whatever, then add this php code to the header in place of the header image. Load your images via FTP to an images directory to make it easier.

    <?php $rand = rand(0,9); ?><img src="images/image<?php echo rand(1,9) ?>.jpg" />

    replace 9 with however many images you have and images/image with the path and filename of your images. If they're not jpg images you'll also need to change the .jpg to .gif or .png or whatever

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.