createscape
11/27/2015 - 9:11 PM

Return a randomized css class with number

Return a randomized css class with number

<?php while (have_posts()) : the_post(); ?>
	<?php
function random($max){
$random = rand(1, $max);
$bgClass = "bg-watermark-".$random;
return $bgClass;
}
?>
<div class="container <?php echo random(4); ?>" id="main">