Home › Forums › Support › (Random) Rotate Header / Logo (per page view) › Reply To: (Random) Rotate Header / Logo (per page view)
November 23, 2015 at 9:10 am
#154994
Lead Developer
Lead Developer
You could maybe do something like this in GP Hooks (Before Header Content):
<?php
$headers = array(
'http://yourwebsite.com/URL/TO/header1.jpg',
'http://yourwebsite.com/URL/TO/header2.jpg',
'http://yourwebsite.com/URL/TO/header3.jpg',
'http://yourwebsite.com/URL/TO/header4.jpg',
);
$random = $headers[ rand( 0, count( $headers ) -1 ) ];
echo '<img src="' . $random . '" alt="" />';
?>