« Ein kleiner aber erster Schritt
» kein Foto der Woche

programmieren, wordpress

Wordpress Plugin: Header Randomizer

02.07.06 | 47 Kommentare

I created a small and simple Wordpress Plugin to display a random header image. I know the K2 themes provides that - but since I don’t have K2, this is my solution.

Installation

  1. View the plugin source
  2. Copy and paste it in a file called “randomizer.php” in your wp-content/plugins/ folder
  3. Create a folder called header-images/ in your wp-content/ folder and give it full access rights (777)
  4. Go to your Plugins admin page and activate the plugin
  5. That’s it…

Use

When activated you will get under Options –> Header Randomizer an admin interface where you can see if you set up your image folder correctly, you can change the CSS header tag and view the images in your image folder.

And your header image will change of course.

Notes

  • I tested it only with WP 2.0.2 but it should work with 1.5 as well.
  • If you have questions, bug reports or praise just let me know.
  • The size of your header images is defined in your stylesheet. Please look in your CSS file or take a look at your current image size.

Important

If you get a Can’t modify header information warning, remove all spaces before and after the PHP open and close tags at the beginning and end of the file.

47 Kommentare