ID, 'hero_image', true);
//PROBABLY NEEDS OPTOMIZED / MAYBE BETTER WAY TO DO THIS...
//Get all images from media library
$media_query = new WP_Query(
array(
'post_type' => 'attachment',
'post_status' => 'inherit',
'posts_per_page' => -1,
)
);
$list = array();
//Search for one called 'heroImage' and grab its URL
foreach ($media_query->posts as $post) {
if (($names[] = get_the_title($post->ID)) == "heroImage") {
$list[] = wp_get_attachment_url($post->ID);
}
}
?>