Created
June 27, 2013 16:19
-
-
Save clifgriffin/5877866 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global $post; | |
$images = get_children('post_type=attachment&post_mime_type=image&post_parent=' . $post->ID . '&orderby=menu_order&order=ASC'); | |
foreach($images as $img) { | |
$image_attributes = wp_get_attachment_image_src($img->ID, "products"); | |
$src = $image_attributes[0]; | |
if(!empty($src)) { | |
echo "<img src='$src' />"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment