Sunday, June 6, 2010

use randoms images in header

February 9, 2010 by admin · Leave a Comment 

Header of a blog is a particularly important because it is the first thing seen by those who access the site. It can give a first impression on a blog.

How can you do the header images to change the reloading a page?For start: we need to make some images which have the same dimensions. File names must be like imagineheader_1.gif, imagineheader_2.gif.

After we did this we have put in file header.php following cod:

<img src="http://caleaspreimagine/imagineheader_<?php echo(rand(1,3)); ?>.gif"
width="latimeimagine" height="inaltimeimagine" alt="image_alt_text" />

If we want to put more that 3images you must change only the number 3.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • FriendFeed
  • Netvibes
  • Reddit
  • RSS
  • Suggest to Techmeme via Twitter
  • Tumblr
  • Twitter
  • Twitthis
  • Blogosphere News
  • email
  • LinkedIn
  • Linkter
  • Live
  • MyShare
  • MySpace
  • Ping.fm
  • StumbleUpon
  • Technorati
  • Yahoo! Bookmarks
  • Yahoo! Buzz

Related posts:

  1. show most commented pages with images in Wordpress
  2. Display last tweets on your wordpress blog
  3. Wordpress 3.0:Style WordPress editor using CSS
  4. show last comments with the avatar in wordpress
  5. show only some categories o wordpress menu

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!

SEO Powered by Platinum SEO from Techblissonline