หมุนเปลี่ยน Headers
Wednesday, August 30th, 2006หากเรามีรูปภาพ 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/








