It's time to bring your Joomla K2 website to the next level - How? By randomizing your extra field output, that's how.
Nobody wants to experience that same thing over & over. Variety is the spice of life - right?
This wise quote holds true for your website. By randomizing your content, you can create a unique experience for your visitors.
Here's the Copy & Paste code to randomize your extra field output:
<?php
$input = array("AAA", "BBB", "CCC");
$rand_keys = array_rand($input, 2);
echo $this->item->extraFields->$input[$rand_keys[0]]->value;
?>
I am using this to randomize call-to-actions, greetings and thank you messages.
Do you have any cool ideas on how to utilize this tip? If so, please share (because sharing is caring :)