Say I had a post or page that was called interesting stuff. Is there a way I can display all the images from a folder called interesting stuff? Changing the contents of the folder would change the photos being displayed on the post or page.
I found this searching the web:
<?php
$files = glob("images/*.*");
for ($i=1; $i<count($files); $i++)
{
$num = $files[$i];
echo '<img src="'.$num.'" alt="random image">'." ";
}
?>
But I have never been able to get php code to run inside a post or page.