Open the wp-config.php file and check there’s no extra lines or spaces after the ?>
at the bottom..
You shouldn’t need the output buffering in this case, so is there a particular reason you believe it will help?
In would help to know what is in this file and on that line.
wp-content/themes/mytheme.php on line 785
Most common cause of the headers not sent error is white-space where it shouldn’t be. Check the config file first, as this is a common culprit..
Regarding image rotation, there’s ton of scripts for the job, you only need a PHP script, take you pick.
There are more then enough users here that are capable of providing you with one, i’ve given you one of many examples of random images…
If you search the forum you’ll find other example code..
A more basic random number function.
<?php
$numbers = range(1, 10);
$numbers = array_rand($numbers,1);
print $numbers;
?>
Or with non-numeric array items…
<?php
$input = array("Neo", "Morpheus", "Trinity", "Cypher", "Tank");
$rand_keys = array_rand($input);
echo $input[$rand_keys] . "\n";
?>