Hi, I am having some troubles with this function.
I have a index page that only show the post, i wanted to show an image also so i added an image form the admin panel.
when I use
$Img = wp_get_attachment_image($post->ID); nothing happens Img is empty.
however, if I use
the_content() in the loop it shows the image.
so i know the image is working, the question is why can't i retrieve it individual?
i have also used
<?php $image = wp_get_attachment_image_src($post->ID); ?> with the same results.