Hackers sale 1.5 million Facebook accounts
June 15, 2010 – 12:24 pm|

After discussing about millat facebook, there is shocking news from facebook, A hacker who calls himself Kirllos have 1.5 million Facebook accounts for sale on a secret hacker forum. He asks at least $ …

Read the full story »
Home » tempe media

How to Make Header Images Random

May 25, 2009 – 8:13 am15 views

1)Get the Images

Okay, get 4 images that you want to use on your blog. Here’s what I’ll be using:

  • header1.jpg
  • header2.jpg
  • header3.jpg
  • header4.jpg

Put all of these images in a folder called images in your theme folder. If you don’t have that folder yet, go ahead and create one now.

2) Randomizing the Images

Put this code in your header.php file just below the tag:

<?php
$header_image = rand(1,4);
?>

So if you more or less images, you can change 4 to whatever it is.
3) Randomizing in the Header

If you’re using a more professional WordPress theme, then more than likely the header image is going to be called in from the .css file using a header DIV. Well, you’re going to have to get rid of that, and use this old-school HTML technique.

Use this code to pull the header images into your theme:

<img src="<? bloginfo('template_directory'); ?>/images/blogtop-<? echo $header_image; ?>.gif" alt="header" />

So that concludes our random header image tutorial for WordPress. You can pretty much use the same technique, but modify it a little bit, if you want to use this on a static HTML/CSS website, a forum, or maybe even another CMS!

source : wptheme

Related Post

  • No Related Posts

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar blog.

 

HOT SEARCH :

how to make random header blogger, how to make tempe