Blogging Underground- Top Traffic Ranking System Check Here
  Share

Display Random or Rotating Images in wordpress Header

by Bilal Ahmad on November 5, 2009

If you miss the previous posts which was How to highlight admin comments in wordpress, then read the post now. In this post we are going to add rotating images in header.
It is the header appearing first to a visitors. So make the header more attractive and add Random or Rotating Images in header. You can see that normally there is a fix image in all most every blog. But here we are going to add a rotating images inĀ  header.

How to Display Rotating OR Random Images in header

First of all create some images of jpg format. Let say you want to add 3 rotating images to your header. Display Random or Rotating Images in wordpress Header

Just create 3 images of the same size. Make sure that all the images must have the same size.
Now name the images in this sequence

Headerimage_1.jpg
Headerimage_2.jpg
Headerimage_4.jpg

The sequence for the name of images must be the same as mentioned above. Now upload all the images to your image directory and paste the below code in your header.php

<img src=”http://path_to_images/headerimage_<?php echo(rand(1,3)); ?>.jpg”
width=”image_width” height=”image_height” alt=”image_alt_text” />

Save your Template and that’s all. Now you can see that all the three images are rotating in your blog header.Ok there are allot of more things to do with your blog. If you have not added a Favicon to your blog, then add a Favicon to your blog. Well allot of bloggers also want to add Retweet button, so don’t forget to add the Retweet button in your blog.


Previous Posts by Bilal Ahmad
Related Posts:
  1. Display Sticky Header Bar In WordPress Blog Using CSS Code
  2. Display Recent Post from a Specific Category in wordpress
  3. Display Adsense Ads Below Nav Bar in TechMaish WordPress Theme
  4. Add Header Logo and Custom Favicon in Thesis Theme
  5. Rotate your PC windows monitor Display Screen

Leave a Comment

 

Previous post:

Next post: