Haven't tested, but something like this should work (assuming I've understood your question):
<?php
$sizes = array('thumbnail', 'medium', 'large', 'full');
$index = array_rand($sizes);
echo get_the_post_thumbnail($page->ID, $sizes[$index]);
?>
문제
I'm getting a thumbnail like this in Wordpress:
<?php echo get_the_post_thumbnail($page->ID, 'thumbnail'); ?>
Now there is 'thumbnail' size but also 'medium', 'large' and 'full'.
How do I get the php code to display these size random? So sometimes there 'small' then 'thumbnail' and then 'full'.
해결책
Haven't tested, but something like this should work (assuming I've understood your question):
<?php
$sizes = array('thumbnail', 'medium', 'large', 'full');
$index = array_rand($sizes);
echo get_the_post_thumbnail($page->ID, $sizes[$index]);
?>