I'm trying to get all of the images inside a specific sub-directory within the WordPress uploads directory, and then output all of those images.
$upload_dir = wp_upload_dir();
$logo_dir = ( $upload_dir['baseurl'] . '/logos/' );
echo $logo_dir . '-----<br />';
$images = glob( $logo_dir . "*.PNG" );
foreach( $images as $image ) {
echo $image;
}
$logo_dir
is outputting the correct directory. I'm not sure what I'm doing wrong with the foreach.
.PNG
extension?