Last active
January 25, 2018 17:59
-
-
Save rwdevpixelparlor/601157cefc1cdd1a2fa1c27d569bbdfe to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// functions.php | |
function wpb_bg() { | |
$rand = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'); | |
$color ='#'.$rand[rand(0,15)].$rand[rand(0,15)].$rand[rand(0,15)]. | |
$rand[rand(0,15)].$rand[rand(0,15)].$rand[rand(0,15)]; | |
echo $color; | |
} | |
?> | |
<body | |
<?php | |
// page.php or whatever page file you are using. | |
body_class(); ?> style="background-color:<?php wpb_bg(); | |
?>" | |
>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment