หมุนเปลี่ยน Headers

หากเรามีรูปภาพ header หลายๆ ภาพ ก็สามารถสุ่มภาพเหล่านั้น นำมาหมุนเวียนเปลี่ยนกันแสดงที่ด้านบนของบล็อก ผู้เขียนลองทำดูกับ header ของ Kubrick แล้ว (WordPress Default 1.5)
พบว่าได้ผลดี ด้วยการใช้ PHP script

เริ่มจาก ดาวน์โหลดไฟล์ rotate.txt แล้วเปลี่ยนชื่อเป็น rotate.php นำไปเก็บไว้ในแฟ้ม
ที่เก็บภาพ header ของเรา เช่น /wp-content/themes/default/images/rotate/ แล้วเรียกใช้ ดังนี้

#header {
background: url(”/images/rotate/rotate.php”)
no-repeat bottom center; }

Ref:
http://automaticlabs.com/products/rotator
http://www.janicek.com/archives/2005/02/23/rotating-image-banner-for-kubrick/

3 Responses to “หมุนเปลี่ยน Headers”

  1. soilmatter Says:

    อืม คือที่จิงตอนแรกที่ผมติไว้ว่าธีีมอันใหม่นี้ไม่ค่อยสวยเท่าไร คือตอนนั้นที่เข้ามาดูยังไม่ได้เห็นไอข้างบน ที่มีรูปสวยๆเปลี่ยนไปเปลี่ยนมา ผมก็เลยว่าไปซะยังงั้น โดยที่ไม่ได้ดูตาม้าตาเรือเลย ขอโทษครับ

  2. Nip Says:

    เข้าใจ ไม่เป็นไร D

  3. ThaiBlogger.org » Blog Archive » หมุนเปลี่ยน Header #2 Says:

    […] ดูเพิ่มเติม: http://www.thaiblogger.org/2006/08/30/to-rotate-headers.html […]

Leave a Reply

;( :x :s :p :o :d :[ :) :( :$ 8) (~) (y) (w) (u) (t) (p) (o) (n) (l) (i) (g) (f) (e) (d) (c) (b) (^) (@) (8) (*) ;) (&)

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-Spam Image