-->

Tuesday, June 20, 2017

Which of the following is the correct code to get an array of every image uploaded to a particular post?

Which of the following is the correct code to get an array of every image uploaded to a particular post?
Answers:
1.      $images =& get_children( ‘post_type=attachment&post_mime_type=image&post_parent=10’ );
2.      $images = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
3.      $images = get_post(7, ARRAY_A);

4.      It cannot be done
NEXT ARTICLE Next Post
PREVIOUS ARTICLE Previous Post
NEXT ARTICLE Next Post
PREVIOUS ARTICLE Previous Post
 

Delivered by FeedBurner