Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Display random custom content in WooCommerce shop archive loop

$input = array("<img src='/wp-content/uploads/2022/01/banner-test-01.svg'>", " 
<img src='/wp-content/uploads/2022/01/banner-test-02.svg'>", "<img src='/wp- 
content/uploads/2022/01/banner-test-03.svg'>");

$rand_keys = array_rand($input, 1);
echo $input[$rand_keys] . "
";
 
PREVIOUS NEXT
Tagged: #Display #random #custom #content #WooCommerce #shop #archive #loop
ADD COMMENT
Topic
Name
6+8 =