Skip to content

Instantly share code, notes, and snippets.

Created November 21, 2013 20:22
What would you like to do?
Random Testimonial using Advanced Custom Fields Options Page
$rows = get_field( 'testimonials', 'option' );
$row_count = count($rows);
$i = rand(0, $row_count - 1);
echo '<blockquote><p>' . $rows[$i]['quote'] . '</p>';
echo '<cite>' . $rows[$i]['cite'] . '</cite></blockquote>';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment