Loop through child images of a parent for a Nivo Slider
To get attached (i.e. child) images of a post, try using get_children(). e.g.: <?php $child_image_args = array( ‘post_mime_type’ => ‘image’, ‘post_parent’ => $postID, ‘post_type’ => ‘attachment’ ); $child_images = get_children( $child_image_args ); ?> Which returns an associative array of child images. Then, just loop through them, e.g. using wp_get_attachment_image(), to output. e.g.: <div id=”nivoslider”> <?php … Read more