wp_get_attachment_image not showing image
-
I want to move the first image attached to a post out of the loop and into a different div separated from the text that is associated with the post. After reading different articles online it looked like
<?php echo wp_get_attachment_image( ); ?>
is the best way to go about doing this?I have added
<?php echo wp_get_attachment_image( 2 ); ?>
into my theme outside the loop to try and pull the second image associated with a post. However this is not doing anything.Any suggestions are appreciated. Thanks in advance.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘wp_get_attachment_image not showing image’ is closed to new replies.