TutZone- Tutorials, Design news and Inspiration | ![]() |
How to Display Random Header Images Posted: 08 Sep 2010 07:21 AM PDT If you got a huge header, you can try to show to different images each time a user loads your site. You can rotate as many images as you want. But here for example we are giving you a example of three images. Hope this helps some. One Step Procedure:Note: Do take backup of your theme before you try this. 01. First rename your images with a underscore like these: - randomimage_1.gif - randomimage_2.gif - randomimage_3.gif 02. Add this below code in your header.php file or the file where the code for your header image is placed: <img src="http://path_to_images/headerimage_<?php echo(rand(1,3)); ?>.gif" 03. If you want to do with more images, change the number 3. That’s it. |
You are subscribed to email updates from TutZone To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google Inc., 20 West Kinzie, Chicago IL USA 60610 |
No comments:
Post a Comment