Skip to content

Instantly share code, notes, and snippets.

@pycal
Last active August 29, 2015 13:56
Show Gist options
  • Save pycal/7882165896a989718c89 to your computer and use it in GitHub Desktop.
Save pycal/7882165896a989718c89 to your computer and use it in GitHub Desktop.
$args = array(
'post_type' => 'attachment',
'post_mime_type' =>'image',
'post_status' => 'inherit',
'my_custom_taxonomy' => 'example-tax-child'
);
$query_images = new WP_Query( $args );
$images = array();
foreach ( $query_images->posts as $image ) {
$images[] = wp_get_attachment_url( $image->ID );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment