Tag Info

New answers tagged


When saying "not working" you should include what you expect and what you get; "not working" says very little about the problem you have. Without knowing what the exact problem you have, I guess you don't see the image. In that case I suggest to change this: wp_get_attachment_image($photo_id, 'thumbnail'); With: echo wp_get_attachment_image($photo_id, ...


on the template of the page that you are trying to pull the first image on,(if its the post itself, then single.php) you could use the following code instead of the_post_thumbnail function echo_first_image( $postID ) { $args = array( 'numberposts' => 1, 'order' => 'ASC', 'post_mime_type' => 'image', 'post_parent' => $postID, ...

Top 50 recent answers are included