Version: 1.7.1 Retrieve the name, path, or link to a randomly chosen file or files in a specified directory.
Retrieve the name, path, or link to a randomly chosen file or files in a specified directory.
Useful for displaying random images/logos or including text from random files onto your site (writing excerpts, multi-line quotes, etc).
Notes:
<?php echo c2c_random_file('/random'); ?>
Unless you limit the file search to only include a particular extension (via $extensions argument), all files in the specified $dir will be under consideration for random selection
Can be run inside or outside of "the loop"
Links: Plugin Homepage | Plugin Directory Page | Author Homepage
Requires: 2.8 or higher
Compatible up to: 3.5.1
Last Updated: 2012-12-16
Downloads: 17,047
Got something to say? Need help?